Package com.gargoylesoftware.htmlunit.javascript.host.css

Examples of com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleDeclaration$StyleElement


            // display: iterate top to bottom, because if a parent is display:none,
            // there's nothing that a child can do to override it
            for (final Node node : getAncestors(true)) {
                final ScriptableObject scriptableObject = ((DomNode) node).getScriptObject();
                if (scriptableObject instanceof HTMLElement) {
                    final CSSStyleDeclaration style = ((HTMLElement) scriptableObject).jsxGet_currentStyle();
                    final String display = style.jsxGet_display();
                    if ("none".equals(display)) {
                        return false;
                    }
                }
            }
            // visibility: iterate bottom to top, because children can override
            // the visibility used by parent nodes
            final boolean isNotIE = !((HtmlPage) page).getWebClient().getBrowserVersion().isIE();
            DomNode node = this;
            do {
                final ScriptableObject scriptableObject = node.getScriptObject();
                if (scriptableObject instanceof HTMLElement) {
                    final CSSStyleDeclaration style = ((HTMLElement) scriptableObject).jsxGet_currentStyle();
                    final String visibility = style.jsxGet_visibility();
                    if (visibility.length() > 0) {
                        if (visibility.equals("visible")) {
                            return true;
                        }
                        else if (visibility.equals("hidden") || (isNotIE && visibility.equals("collapse"))) {
View Full Code Here


        }
        if (style != null) {
            return style;
        }

        final CSSStyleDeclaration original = element.jsxGet_style();
        style = new ComputedCSSStyleDeclaration(original);

        final StyleSheetList sheets = document_.jsxGet_styleSheets();
        for (int i = 0; i < sheets.jsxGet_length(); i++) {
            final Stylesheet sheet = (Stylesheet) sheets.jsxFunction_item(i);
View Full Code Here

     */
    @Override
    public void setDomNode(final DomNode domNode) {
        super.setDomNode(domNode);

        style_ = new CSSStyleDeclaration(this);

        /**
         * Convert JavaScript snippets defined in the attribute map to executable event handlers.
         * Should be called only on construction.
         */
 
View Full Code Here

TOP

Related Classes of com.gargoylesoftware.htmlunit.javascript.host.css.CSSStyleDeclaration$StyleElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.