/** * {@inheritDoc} */ @Override public void setOnload(final Object eventHandler) { super.setOnload(eventHandler); isAttachedToPageDuringOnload_ = getDomNodeOrDie().isAttachedToPage(); }
/** * {@inheritDoc} */ @Override public void setOnload(final Object eventHandler) { super.setOnload(eventHandler); isAttachedToPageDuringOnload_ = getDomNodeOrDie().isAttachedToPage(); }
/** * Returns the current (calculated) style object for this element. * @return the current (calculated) style object for this element */ @JsxGetter(IE) public ComputedCSSStyleDeclaration getCurrentStyle() { if (!getDomNodeOrDie().isAttachedToPage()) { return null; } return getWindow().getComputedStyle(this, null); }
/** * Returns the current (calculated) style object for this element. * @return the current (calculated) style object for this element */ @JsxGetter(IE) public ComputedCSSStyleDeclaration getCurrentStyle() { if (!getDomNodeOrDie().isAttachedToPage()) { return null; } return getWindow().getComputedStyle(this, null); }
final String oldAttributeValue = getAttribute(qualifiedName); final HtmlPage htmlPage = (HtmlPage) getPage(); final boolean mappedElement = isAttachedToPage() && HtmlPage.isMappedElement(htmlPage, qualifiedName); if (mappedElement) {
final String oldAttributeValue = getAttribute(qualifiedName); final HtmlPage htmlPage = (HtmlPage) getPage(); final boolean mappedElement = isAttachedToPage() && HtmlPage.isMappedElement(htmlPage, qualifiedName); if (mappedElement) {
/** * Returns this element's <tt>offsetHeight</tt>, which is the element height plus the element's padding * plus the element's border. This method returns a dummy value compatible with mouse event coordinates * during mouse events. * @return this element's <tt>offsetHeight</tt> * @see <a href="http://msdn2.microsoft.com/en-us/library/ms534199.aspx">MSDN Documentation</a> * @see <a href="http://www.quirksmode.org/js/elementdimensions.html">Element Dimensions</a> */ @JsxGetter public int getOffsetHeight() { if (isDisplayNone() || !getDomNodeOrDie().isAttachedToPage()) { return 0; } final MouseEvent event = MouseEvent.getCurrentMouseEvent(); if (isAncestorOfEventTarget(event)) { // compute appropriate offset height to pretend mouse event was produced within this element return event.getClientY() - getPosY() + 50; } final ComputedCSSStyleDeclaration style = getWindow().getComputedStyle(this, null); return style.getCalculatedHeight(true, true); }
/** * Returns this element's <tt>offsetWidth</tt>, which is the element width plus the element's padding * plus the element's border. This method returns a dummy value compatible with mouse event coordinates * during mouse events. * @return this element's <tt>offsetWidth</tt> * @see <a href="http://msdn2.microsoft.com/en-us/library/ms534304.aspx">MSDN Documentation</a> * @see <a href="http://www.quirksmode.org/js/elementdimensions.html">Element Dimensions</a> */ @JsxGetter public int getOffsetWidth() { if (isDisplayNone() || !getDomNodeOrDie().isAttachedToPage()) { return 0; } final MouseEvent event = MouseEvent.getCurrentMouseEvent(); if (isAncestorOfEventTarget(event)) { // compute appropriate offset width to pretend mouse event was produced within this element return event.getClientX() - getPosX() + 50; } final ComputedCSSStyleDeclaration style = getWindow().getComputedStyle(this, null); return style.getCalculatedWidth(true, true); }
/** * Returns this element's <tt>offsetWidth</tt>, which is the element width plus the element's padding * plus the element's border. This method returns a dummy value compatible with mouse event coordinates * during mouse events. * @return this element's <tt>offsetWidth</tt> * @see <a href="http://msdn2.microsoft.com/en-us/library/ms534304.aspx">MSDN Documentation</a> * @see <a href="http://www.quirksmode.org/js/elementdimensions.html">Element Dimensions</a> */ @JsxGetter public int getOffsetWidth() { if (isDisplayNone() || !getDomNodeOrDie().isAttachedToPage()) { return 0; } final MouseEvent event = MouseEvent.getCurrentMouseEvent(); if (isAncestorOfEventTarget(event)) { // compute appropriate offset width to pretend mouse event was produced within this element return event.getClientX() - getPosX() + 50; } final ComputedCSSStyleDeclaration style = getWindow().getComputedStyle(this, null); return style.getCalculatedWidth(true, true); }
/** * Returns this element's <tt>offsetHeight</tt>, which is the element height plus the element's padding * plus the element's border. This method returns a dummy value compatible with mouse event coordinates * during mouse events. * @return this element's <tt>offsetHeight</tt> * @see <a href="http://msdn2.microsoft.com/en-us/library/ms534199.aspx">MSDN Documentation</a> * @see <a href="http://www.quirksmode.org/js/elementdimensions.html">Element Dimensions</a> */ @JsxGetter public int getOffsetHeight() { if (isDisplayNone() || !getDomNodeOrDie().isAttachedToPage()) { return 0; } final MouseEvent event = MouseEvent.getCurrentMouseEvent(); if (isAncestorOfEventTarget(event)) { // compute appropriate offset height to pretend mouse event was produced within this element return event.getClientY() - getPosY() + 50; } final ComputedCSSStyleDeclaration style = getWindow().getComputedStyle(this, null); return style.getCalculatedHeight(true, true); }
final boolean mappedElement = isAttachedToPage() && HtmlPage.isMappedElement(htmlPage, qualifiedName); if (mappedElement) {
final boolean mappedElement = isAttachedToPage() && HtmlPage.isMappedElement(htmlPage, qualifiedName); if (mappedElement) {
if (!isAttachedToPage()) { final BrowserVersion browserVersion = page.getWebClient().getBrowserVersion(); if (browserVersion.hasFeature(HTMLELEMENT_DETACH_ACTIVE_TRIGGERS_NO_KEYUP_EVENT)) {
if (!isAttachedToPage()) { final BrowserVersion browserVersion = page.getWebClient().getBrowserVersion(); if (browserVersion.hasFeature(HTMLELEMENT_DETACH_ACTIVE_TRIGGERS_NO_KEYUP_EVENT)) {