/** * Handles a character data modification in the document. */ protected void handleCharacterDataModified(Node n) { if (getCSSParentNode(n) instanceof CSSStyleSheetNode) { // Invalidate all the CSSStylableElements in the document. styleSheetNodes = null; invalidateProperties(document.getDocumentElement(), null, null, true); } }
/** * Handles a character data modification in the document. */ protected void handleCharacterDataModified(Node n) { if (getCSSParentNode(n) instanceof CSSStyleSheetNode) { // Invalidate all the CSSStylableElements in the document. styleSheetNodes = null; invalidateProperties(document.getDocumentElement(), null, null, true); } }
/** * Handles a character data modification in the document. */ protected void handleCharacterDataModified(Node n) { if (getCSSParentNode(n) instanceof CSSStyleSheetNode) { // Invalidate all the CSSStylableElements in the document. styleSheetNodes = null; invalidateProperties(document.getDocumentElement(), null, null, true); } }
/** * Handles a subtree modification in the document. * todo the incoming Node is actually ignored (not used) here, * but it seems caller-sites assume that it is used - is this done right?? */ protected void handleSubtreeModified(Node ignored) { if (styleSheetRemoved) { // Invalidate all the CSSStylableElements in the document. styleSheetRemoved = false; styleSheetNodes = null; invalidateProperties(document.getDocumentElement(), null, null, true); } else if (removedStylableElementSibling != null) { // Invalidate the CSSStylableElement siblings, to // correctly match the adjacent selectors and // first-child pseudo-class. Node n = removedStylableElementSibling; while (n != null) { invalidateProperties(n, null, null, true); n = getCSSNextSibling(n); } removedStylableElementSibling = null; } }
/** * Handles a subtree modification in the document. * todo the incoming Node is actually ignored (not used) here, * but it seems caller-sites assume that it is used - is this done right?? */ protected void handleSubtreeModified(Node ignored) { if (styleSheetRemoved) { // Invalidate all the CSSStylableElements in the document. styleSheetRemoved = false; styleSheetNodes = null; invalidateProperties(document.getDocumentElement(), null, null, true); } else if (removedStylableElementSibling != null) { // Invalidate the CSSStylableElement siblings, to // correctly match the adjacent selectors and // first-child pseudo-class. Node n = removedStylableElementSibling; while (n != null) { invalidateProperties(n, null, null, true); n = getCSSNextSibling(n); } removedStylableElementSibling = null; } }
/** * Handles a subtree modification in the document. * todo the incoming Node is actually ignored (not used) here, * but it seems caller-sites assume that it is used - is this done right?? */ protected void handleSubtreeModified(Node ignored) { if (styleSheetRemoved) { // Invalidate all the CSSStylableElements in the document. styleSheetRemoved = false; styleSheetNodes = null; invalidateProperties(document.getDocumentElement(), null, null, true); } else if (removedStylableElementSibling != null) { // Invalidate the CSSStylableElement siblings, to // correctly match the adjacent selectors and // first-child pseudo-class. Node n = removedStylableElementSibling; while (n != null) { invalidateProperties(n, null, null, true); n = getCSSNextSibling(n); } removedStylableElementSibling = null; } }
/** * Handles a node insertion in the document. */ protected void handleNodeInserted(Node n) { if (hasStyleSheetNode(n)) { // Invalidate all the CSSStylableElements in the document. styleSheetNodes = null; invalidateProperties(document.getDocumentElement(), null, null, true); } else if (n instanceof CSSStylableElement) { // Invalidate the CSSStylableElement siblings, to correctly // match the adjacent selectors and first-child pseudo-class. n = getCSSNextSibling(n); while (n != null) { invalidateProperties(n, null, null, true); n = getCSSNextSibling(n); } } }
/** * Handles a node insertion in the document. */ protected void handleNodeInserted(Node n) { if (hasStyleSheetNode(n)) { // Invalidate all the CSSStylableElements in the document. styleSheetNodes = null; invalidateProperties(document.getDocumentElement(), null, null, true); } else if (n instanceof CSSStylableElement) { // Invalidate the CSSStylableElement siblings, to correctly // match the adjacent selectors and first-child pseudo-class. n = getCSSNextSibling(n); while (n != null) { invalidateProperties(n, null, null, true); n = getCSSNextSibling(n); } } }
/** * Handles a node insertion in the document. */ protected void handleNodeInserted(Node n) { if (hasStyleSheetNode(n)) { // Invalidate all the CSSStylableElements in the document. styleSheetNodes = null; invalidateProperties(document.getDocumentElement(), null, null, true); } else if (n instanceof CSSStylableElement) { // Invalidate the CSSStylableElement siblings, to correctly // match the adjacent selectors and first-child pseudo-class. n = getCSSNextSibling(n); while (n != null) { invalidateProperties(n, null, null, true); n = getCSSNextSibling(n); } } }
/** * A property in the override style declaration has been changed. */ public void overrideStylePropertyChanged(CSSStylableElement elt, String name, String val, String prio) { boolean important = prio != null && prio.length() != 0; StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); declaration = p.getStyleDeclaration(); setMainProperties(elt, this, name, val, important); declaration = null; invalidateProperties(elt, null, mainPropertiesChanged, true); }
/** * A property in the override style declaration has been changed. */ public void overrideStylePropertyChanged(CSSStylableElement elt, String name, String val, String prio) { boolean important = prio != null && prio.length() != 0; StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); declaration = p.getStyleDeclaration(); setMainProperties(elt, this, name, val, important); declaration = null; invalidateProperties(elt, null, mainPropertiesChanged, true); }
/** * A property in the override style declaration has been changed. */ public void overrideStylePropertyChanged(CSSStylableElement elt, String name, String val, String prio) { boolean important = prio != null && prio.length() != 0; StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); declaration = p.getStyleDeclaration(); setMainProperties(elt, this, name, val, important); declaration = null; invalidateProperties(elt, null, mainPropertiesChanged, true); }
invalidateProperties(elt, null, null, true); for (Node n = getCSSNextSibling(elt); n != null; n = getCSSNextSibling(n)) { invalidateProperties(n, null, null, true);
invalidateProperties(elt, null, null, true); for (Node n = getCSSNextSibling(elt); n != null; n = getCSSNextSibling(n)) { invalidateProperties(n, null, null, true);
/** * A property in the override style declaration has been removed. */ public void overrideStylePropertyRemoved(CSSStylableElement elt, String name) { StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); StyleDeclaration declaration = p.getStyleDeclaration(); int idx = getPropertyIndex(name); int ds = declaration.size(); for (int i = 0; i < ds; i++) { if (idx == declaration.getIndex(i)) { declaration.remove(i); StyleMap style = elt.getComputedStyleMap(null); if (style != null && style.getOrigin(idx) == StyleMap.OVERRIDE_ORIGIN /* && style.isComputed(idx) */) { invalidateProperties (elt, new int[] { idx }, null, true); } break; } } }
/** * A property in the override style declaration has been removed. */ public void overrideStylePropertyRemoved(CSSStylableElement elt, String name) { StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); StyleDeclaration declaration = p.getStyleDeclaration(); int idx = getPropertyIndex(name); int ds = declaration.size(); for (int i = 0; i < ds; i++) { if (idx == declaration.getIndex(i)) { declaration.remove(i); StyleMap style = elt.getComputedStyleMap(null); if (style != null && style.getOrigin(idx) == StyleMap.OVERRIDE_ORIGIN /* && style.isComputed(idx) */) { invalidateProperties (elt, new int[] { idx }, null, true); } break; } } }
/** * A property in the override style declaration has been removed. */ public void overrideStylePropertyRemoved(CSSStylableElement elt, String name) { StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); StyleDeclaration declaration = p.getStyleDeclaration(); int idx = getPropertyIndex(name); int ds = declaration.size(); for (int i = 0; i < ds; i++) { if (idx == declaration.getIndex(i)) { declaration.remove(i); StyleMap style = elt.getComputedStyleMap(null); if (style != null && style.getOrigin(idx) == StyleMap.OVERRIDE_ORIGIN /* && style.isComputed(idx) */) { invalidateProperties (elt, new int[] { idx }, null, true); } break; } } }
/** * The text of the override style declaration for this element has been * modified. */ public void overrideStyleTextChanged(CSSStylableElement elt, String text) { StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); StyleDeclaration declaration = p.getStyleDeclaration(); int ds = declaration.size(); boolean[] updated = new boolean[getNumberOfProperties()]; for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } declaration = parseStyleDeclaration(elt, text); p.setStyleDeclaration(declaration); ds = declaration.size(); for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } invalidateProperties(elt, null, updated, true); }
/** * The text of the override style declaration for this element has been * modified. */ public void overrideStyleTextChanged(CSSStylableElement elt, String text) { StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); StyleDeclaration declaration = p.getStyleDeclaration(); int ds = declaration.size(); boolean[] updated = new boolean[getNumberOfProperties()]; for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } declaration = parseStyleDeclaration(elt, text); p.setStyleDeclaration(declaration); ds = declaration.size(); for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } invalidateProperties(elt, null, updated, true); }
/** * The text of the override style declaration for this element has been * modified. */ public void overrideStyleTextChanged(CSSStylableElement elt, String text) { StyleDeclarationProvider p = elt.getOverrideStyleDeclarationProvider(); StyleDeclaration declaration = p.getStyleDeclaration(); int ds = declaration.size(); boolean[] updated = new boolean[getNumberOfProperties()]; for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } declaration = parseStyleDeclaration(elt, text); p.setStyleDeclaration(declaration); ds = declaration.size(); for (int i = 0; i < ds; i++) { updated[declaration.getIndex(i)] = true; } invalidateProperties(elt, null, updated, true); }