/** * An auxiliary method for getStyleSheets(). */ protected void findStyleSheetNodes(Node n) { if (n instanceof CSSStyleSheetNode) { styleSheetNodes.add(n); } for (Node nd = getCSSFirstChild(n); nd != null; nd = getCSSNextSibling(nd)) { findStyleSheetNodes(nd); } }
/** * An auxiliary method for getStyleSheets(). */ protected void findStyleSheetNodes(Node n) { if (n instanceof CSSStyleSheetNode) { styleSheetNodes.add(n); } for (Node nd = getCSSFirstChild(n); nd != null; nd = getCSSNextSibling(nd)) { findStyleSheetNodes(nd); } }
/** * An auxiliary method for getStyleSheets(). */ protected void findStyleSheetNodes(Node n) { if (n instanceof CSSStyleSheetNode) { styleSheetNodes.add(n); } for (Node nd = getCSSFirstChild(n); nd != null; nd = getCSSNextSibling(nd)) { findStyleSheetNodes(nd); } }
/** * Returns the document CSSStyleSheetNodes in a list. This list is * updated as the document is modified. */ public List getStyleSheetNodes() { if (styleSheetNodes == null) { styleSheetNodes = new ArrayList(); selectorAttributes = new HashSet(); // Find all the style-sheets in the document. findStyleSheetNodes(document); int len = styleSheetNodes.size(); for (Object styleSheetNode : styleSheetNodes) { CSSStyleSheetNode ssn; ssn = (CSSStyleSheetNode) styleSheetNode; StyleSheet ss = ssn.getCSSStyleSheet(); if (ss != null) { findSelectorAttributes(selectorAttributes, ss); } } } return styleSheetNodes; }
/** * Returns the document CSSStyleSheetNodes in a list. This list is * updated as the document is modified. */ public List getStyleSheetNodes() { if (styleSheetNodes == null) { styleSheetNodes = new ArrayList(); selectorAttributes = new HashSet(); // Find all the style-sheets in the document. findStyleSheetNodes(document); int len = styleSheetNodes.size(); for (Object styleSheetNode : styleSheetNodes) { CSSStyleSheetNode ssn; ssn = (CSSStyleSheetNode) styleSheetNode; StyleSheet ss = ssn.getCSSStyleSheet(); if (ss != null) { findSelectorAttributes(selectorAttributes, ss); } } } return styleSheetNodes; }
/** * Returns the document CSSStyleSheetNodes in a list. This list is * updated as the document is modified. */ public List getStyleSheetNodes() { if (styleSheetNodes == null) { styleSheetNodes = new ArrayList(); selectorAttributes = new HashSet(); // Find all the style-sheets in the document. findStyleSheetNodes(document); int len = styleSheetNodes.size(); for (int i = 0; i < len; i++) { CSSStyleSheetNode ssn; ssn = (CSSStyleSheetNode)styleSheetNodes.get(i); StyleSheet ss = ssn.getCSSStyleSheet(); if (ss != null) { findSelectorAttributes(selectorAttributes, ss); } } } return styleSheetNodes; }
protected void findStyleSheetNodes() { // <removing set/getRoot from RaveDocument> // Node root = ((RaveDocument)document).getRoot(); // findStyleSheetNodes(root); // ==== // XXX FIXME Here we need to work with the rendered HTML DOM directly, // there is no interest in the original JSP DOM. // FileObject markupFile = InSyncService.getProvider().getFileObject(document); // if (markupFile != null) { // DocumentFragment df = InSyncService.getProvider().getHtmlDomFragmentForMarkupFile(markupFile); // DocumentFragment df = InSyncService.getProvider().getHtmlDomFragmentForDocument(document); UserAgent userAgent = getUserAgent(); DocumentFragment df = userAgent == null ? null : userAgent.getHtmlDomFragmentForDocument(document); if (df != null) { findStyleSheetNodes(df); return; } // } // XXX Log problem? super.findStyleSheetNodes(); // <removing set/getRoot from RaveDocument> }