/** * Tells whether the given property is important. */ public boolean isImportant(String name) { int idx = cssEngine.getPropertyIndex(name); for (int i = 0; i < declaration.size(); i++) { if (idx == declaration.getIndex(i)) { return declaration.getPriority(i); } } return false; }
/** * Tells whether the given property is important. */ public boolean isImportant(String name) { int idx = cssEngine.getPropertyIndex(name); for (int i = 0; i < declaration.size(); i++) { if (idx == declaration.getIndex(i)) { return declaration.getPriority(i); } } return false; }
/** * Tells whether the given property is important. */ public boolean isImportant(String name) { int idx = cssEngine.getPropertyIndex(name); for (int i = 0; i < declaration.size(); i++) { if (idx == declaration.getIndex(i)) { return declaration.getPriority(i); } } return false; }
sd.getIndex(i), sd.getValue(i), sd.getPriority(i), origin); int idx = sd.getIndex(i); sm.putValue(idx, sd.getValue(i)); sm.putImportant(idx, sd.getPriority(i)); sm.putOrigin(idx, origin);
sd.getIndex(i), sd.getValue(i), sd.getPriority(i), origin); int idx = sd.getIndex(i); sm.putValue(idx, sd.getValue(i)); sm.putImportant(idx, sd.getPriority(i)); sm.putOrigin(idx, origin);
sd.getIndex(i), sd.getValue(i), sd.getPriority(i), origin); int idx = sd.getIndex(i); sm.putValue(idx, sd.getValue(i)); sm.putImportant(idx, sd.getPriority(i)); sm.putOrigin(idx, origin);
/** * <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)); }
int idx = over.getIndex(i); Value value = over.getValue(i); boolean important = over.getPriority(i); if (!result.isImportant(idx) || important) { result.putValue(idx, value);
int idx = over.getIndex(i); Value value = over.getValue(i); boolean important = over.getPriority(i); if (!result.isImportant(idx) || important) { result.putValue(idx, value);
int idx = over.getIndex(i); Value value = over.getValue(i); boolean important = over.getPriority(i); if (!result.isImportant(idx) || important) { result.putValue(idx, value);