public boolean isInlineStyleValue(Element element, int propidx) { if (!(element instanceof CSSStylableElement)) { return false; } CSSStylableElement elt = (CSSStylableElement)element; String pseudo = ""; // Pending // NOI18N StyleMap sm = elt.getComputedStyleMap(pseudo); if (sm == null) { return false; } Value value = sm.getValue(propidx); if (value == null) { return false; } return sm.getOrigin(propidx) == StyleMap.INLINE_AUTHOR_ORIGIN; } // </Non engine methods, might be separated>
v = sm.getValue(SVGCSSEngine.FONT_WEIGHT_INDEX); if (v != null) ret.fontWeight = v.getCssText(); v = sm.getValue(SVGCSSEngine.FONT_STYLE_INDEX); if (v != null) ret.fontStyle = v.getCssText(); v = sm.getValue(SVGCSSEngine.FONT_VARIANT_INDEX); if (v != null) ret.fontVariant = v.getCssText(); v = sm.getValue(SVGCSSEngine.FONT_STRETCH_INDEX); if (v != null) ret.fontStretch = v.getCssText(); v = sm.getValue(SVGCSSEngine.SRC_INDEX);
public static String getStringProp(StyleMap sm, CSSEngine eng, int pidx) { Value v = sm.getValue(pidx); ValueManager [] vms = eng.getValueManagers(); if (v == null) { ValueManager vm = vms[pidx]; v = vm.getDefaultValue(); } while (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { v = v.item(0); } return v.getStringValue(); }
public static String getStringProp(StyleMap sm, CSSEngine eng, int pidx) { Value v = sm.getValue(pidx); ValueManager [] vms = eng.getValueManagers(); if (v == null) { ValueManager vm = vms[pidx]; v = vm.getDefaultValue(); } while (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { v = v.item(0); } return v.getStringValue(); }
public static float getFloatProp(StyleMap sm, CSSEngine eng, int pidx) { Value v = sm.getValue(pidx); ValueManager [] vms = eng.getValueManagers(); if (v == null) { ValueManager vm = vms[pidx]; v = vm.getDefaultValue(); } while (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { v = v.item(0); } return v.getFloatValue(); }
public void uncomputeValueForElement(Element element, int propIndex) { if (!(element instanceof CSSStylableElement)) { return; } Document document = element.getOwnerDocument(); XhtmlCssEngine engine = getCssEngine(document); if (engine == null) { return; } // RaveElement xel = (RaveElement)e; CSSStylableElement elt = (CSSStylableElement)element; StyleMap sm = elt.getComputedStyleMap(null); if (sm != null) { Value v = sm.getValue(propIndex); if (v instanceof ComputedValue) { ComputedValue cv = (ComputedValue)v; sm.putComputed(propIndex, false); sm.putValue(propIndex, cv.getCascadedValue()); } } }
public static float getFloatProp(StyleMap sm, CSSEngine eng, int pidx) { Value v = sm.getValue(pidx); ValueManager [] vms = eng.getValueManagers(); if (v == null) { ValueManager vm = vms[pidx]; v = vm.getDefaultValue(); } while (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { v = v.item(0); } return v.getFloatValue(); }
public static float getFloatProp(StyleMap sm, CSSEngine eng, int pidx) { Value v = sm.getValue(pidx); ValueManager [] vms = eng.getValueManagers(); if (v == null) { ValueManager vm = vms[pidx]; v = vm.getDefaultValue(); } while (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { v = v.item(0); } return v.getFloatValue(); }
private static void clearComputedValue(StyleMap style, int n) { if (style.isNullCascaded(n)) { style.putValue(n, null); } else { Value v = style.getValue(n); if (v instanceof ComputedValue) { ComputedValue cv = (ComputedValue)v; v = cv.getCascadedValue(); style.putValue(n, v); } } style.putComputed(n, false); }
public static String getStringProp(StyleMap sm, CSSEngine eng, int pidx) { Value v = sm.getValue(pidx); ValueManager [] vms = eng.getValueManagers(); if (v == null) { ValueManager vm = vms[pidx]; v = vm.getDefaultValue(); } while (v.getCssValueType() == CSSValue.CSS_VALUE_LIST) { v = v.item(0); } return v.getStringValue(); }
private static void clearComputedValue(StyleMap style, int n) { if (style.isNullCascaded(n)) { style.putValue(n, null); } else { Value v = style.getValue(n); if (v instanceof ComputedValue) { ComputedValue cv = (ComputedValue)v; v = cv.getCascadedValue(); style.putValue(n, v); } } style.putComputed(n, false); }
private static void clearComputedValue(StyleMap style, int n) { if (style.isNullCascaded(n)) { style.putValue(n, null); } else { Value v = style.getValue(n); if (v instanceof ComputedValue) { ComputedValue cv = (ComputedValue)v; v = cv.getCascadedValue(); style.putValue(n, v); } } style.putComputed(n, false); }
boolean imp, short origin) { Value dval = dest.getValue(idx); short dorg = dest.getOrigin(idx); boolean dimp = dest.isImportant(idx);
boolean imp, short origin) { Value dval = dest.getValue(idx); short dorg = dest.getOrigin(idx); boolean dimp = dest.isImportant(idx);
boolean imp, short origin) { Value dval = dest.getValue(idx); short dorg = dest.getOrigin(idx); boolean dimp = dest.isImportant(idx);
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#endFontFace()}. */ public void endFontFace() throws CSSException { StyleMap sm = new StyleMap(getNumberOfProperties()); int len = styleDeclaration.size(); for (int i=0; i<len; i++) { int idx = styleDeclaration.getIndex(i); sm.putValue(idx, styleDeclaration.getValue(i)); sm.putImportant(idx, styleDeclaration.getPriority(i)); // Not sure on this.. sm.putOrigin(idx, StyleMap.AUTHOR_ORIGIN); } styleDeclaration = null; int pidx = getPropertyIndex(CSSConstants.CSS_FONT_FAMILY_PROPERTY); Value fontFamily = sm.getValue(pidx); if (fontFamily == null) return; ParsedURL base = getCSSBaseURI(); fontFaces.add(new FontFaceRule(sm, base)); }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#endFontFace()}. */ public void endFontFace() throws CSSException { StyleMap sm = new StyleMap(getNumberOfProperties()); int len = styleDeclaration.size(); for (int i=0; i<len; i++) { int idx = styleDeclaration.getIndex(i); sm.putValue(idx, styleDeclaration.getValue(i)); sm.putImportant(idx, styleDeclaration.getPriority(i)); // Not sure on this.. sm.putOrigin(idx, StyleMap.AUTHOR_ORIGIN); } styleDeclaration = null; int pidx = getPropertyIndex(CSSConstants.CSS_FONT_FAMILY_PROPERTY); Value fontFamily = sm.getValue(pidx); if (fontFamily == null) return; ParsedURL base = getCSSBaseURI(); fontFaces.add(new FontFaceRule(sm, base)); }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.DocumentHandler#endFontFace()}. */ public void endFontFace() throws CSSException { StyleMap sm = new StyleMap(getNumberOfProperties()); int len = styleDeclaration.size(); for (int i=0; i<len; i++) { int idx = styleDeclaration.getIndex(i); sm.putValue(idx, styleDeclaration.getValue(i)); sm.putImportant(idx, styleDeclaration.getPriority(i)); // Not sure on this.. sm.putOrigin(idx, StyleMap.AUTHOR_ORIGIN); } styleDeclaration = null; int pidx = getPropertyIndex(CSSConstants.CSS_FONT_FAMILY_PROPERTY); Value fontFamily = sm.getValue(pidx); if (fontFamily == null) return; ParsedURL base = getCSSBaseURI(); fontFaces.add(new FontFaceRule(sm, base)); }
Value value = sm.getValue(propidx); if (sm.isComputed(propidx)) return value;
Value value = sm.getValue(propidx); if (sm.isComputed(propidx)) return value;