/** * Returns the {@code innerWidth}. * @return the {@code innerWidth} * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_window_ref28.html">Mozilla doc</a> */ @JsxGetter public int getInnerWidth() { return getWebWindow().getInnerWidth(); }
/** * Returns the {@code innerWidth}. * @return the {@code innerWidth} * @see <a href="http://www.mozilla.org/docs/dom/domref/dom_window_ref28.html">Mozilla doc</a> */ @JsxGetter public int getInnerWidth() { return getWebWindow().getInnerWidth(); }
final int windowWidth = element.getWindow().getWebWindow().getInnerWidth();
private String getMarginX(final String superMarginX, final Definition definition) { if (!superMarginX.endsWith("%")) { return pixelString(defaultIfEmpty(superMarginX, "0px", null)); } final Element elem = getElement(); if (!elem.getDomNodeOrDie().isAttachedToPage() && getBrowserVersion().hasFeature(CSS_COMPUTED_NO_Z_INDEX)) { return ""; } final int windowWidth = elem.getWindow().getWebWindow().getInnerWidth(); return pixelString(elem, new CssValue(0, windowWidth) { @Override public String get(final ComputedCSSStyleDeclaration style) { if (style.getElement() == elem) { return style.getStyleAttribute(definition, true); } return style.getStyleAttribute(WIDTH, true); } }); }
private String getMarginX(final String superMarginX, final Definition definition) { if (!superMarginX.endsWith("%")) { return pixelString(defaultIfEmpty(superMarginX, "0px", null)); } final Element elem = getElement(); if (!elem.getDomNodeOrDie().isAttachedToPage() && getBrowserVersion().hasFeature(CSS_COMPUTED_NO_Z_INDEX)) { return ""; } final int windowWidth = elem.getWindow().getWebWindow().getInnerWidth(); return pixelString(elem, new CssValue(0, windowWidth) { @Override public String get(final ComputedCSSStyleDeclaration style) { if (style.getElement() == elem) { return style.getStyleAttribute(definition, true); } return style.getStyleAttribute(WIDTH, true); } }); }
final int windowWidth = element.getWindow().getWebWindow().getInnerWidth();
final int windowWidth = elem.getWindow().getWebWindow().getInnerWidth(); return pixelString(elem, new CssValue(0, windowWidth) { @Override
final int windowWidth = elem.getWindow().getWebWindow().getInnerWidth(); return pixelString(elem, new CssValue(0, windowWidth) { @Override
case "max-width": val = pixelValue((CSSValueImpl) property.getValue(), scriptable); if (val < scriptable.getWindow().getWebWindow().getInnerWidth()) { return false; if (val > scriptable.getWindow().getWebWindow().getInnerWidth()) { return false; if (val < scriptable.getWindow().getWebWindow().getInnerWidth()) { return false; if (val > scriptable.getWindow().getWebWindow().getInnerWidth()) { return false; final WebWindow window = scriptable.getWindow().getWebWindow(); if ("portrait".equals(orient)) { if (window.getInnerWidth() > window.getInnerHeight()) { return false; if (window.getInnerWidth() < window.getInnerHeight()) { return false;
case "max-width": val = pixelValue(property.getValue(), scriptable); if (val == -1 || val < scriptable.getWindow().getWebWindow().getInnerWidth()) { return false; if (val == -1 || val > scriptable.getWindow().getWebWindow().getInnerWidth()) { return false; if (val == -1 || val < scriptable.getWindow().getWebWindow().getInnerWidth()) { return false; if (val == -1 || val > scriptable.getWindow().getWebWindow().getInnerWidth()) { return false; final WebWindow window = scriptable.getWindow().getWebWindow(); if ("portrait".equals(orient)) { if (window.getInnerWidth() > window.getInnerHeight()) { return false; if (window.getInnerWidth() < window.getInnerHeight()) { return false;