public CssValue getCascadedValue() { return CssValueFactory.createCssValue(getComputedValue().getCascadedValue()); }
public boolean isColorTransparentForElement(Element element, int styleIndex) { Value v = getCssValue(element, styleIndex); // XXX #94265 The initial is transparent, but that doesn't work (in browser it doesn't seem to be transparent), // or there might be browser specific stylesheets changing the default behavior. // Hack: For now we ignore when it is initial value. // if (v == CssValueConstants.TRANSPARENT_RGB_VALUE) { // return true; // } if (v instanceof ComputedValue) { return ((ComputedValue)v).getComputedValue() == CssValueConstants.TRANSPARENT_RGB_VALUE; } return false; }
sm.putNullCascaded(propidx, true); } else if (result != value) { ComputedValue cv = new ComputedValue(value); cv.setComputedValue(result); sm.putValue(propidx, cv); result = cv;
sm.putNullCascaded(propidx, true); } else if (result != value) { ComputedValue cv = new ComputedValue(value); cv.setComputedValue(result); sm.putValue(propidx, cv); result = cv;
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()); } } }
sm.putNullCascaded(propidx, true); } else if (result != value) { ComputedValue cv = new ComputedValue(value); cv.setComputedValue(result); sm.putValue(propidx, cv); result = cv;
public Color getColorForElement(Element element, int styleIndex) { Value v = getCssValue(element, styleIndex); if (v == CssValueConstants.TRANSPARENT_RGB_VALUE) { return null; } if (v instanceof ComputedValue && ((ComputedValue)v).getComputedValue() == CssValueConstants.TRANSPARENT_RGB_VALUE) { return null; } if (v != null) { //if (v.getCssValueType() == CSSValue.CSS_PRIMITIVE_VALUE) { return convertColor(v /*, 1*/); /* } else { return PaintServer.convertRGBICCColor (e, v.item(0), (ICCColor)v.item(1), 1, ctx); } */ } return null; }
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 CssListValue getComputedCssListValue(CssValue cssValue) { if (cssValue == null) { return null; } Value value = ((CssValueImpl)cssValue).getValue(); if (value instanceof ListValue) { return CssValueFactory.createCssListValue((ListValue)value); } else if (value instanceof ComputedValue) { ComputedValue computedValue = (ComputedValue)value; Value result = computedValue.getComputedValue(); if (result instanceof ListValue) { return CssValueFactory.createCssListValue((ListValue)result); } } return null; }
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); }
protected float getLineHeight(BridgeContext ctx, Element element, float fontSize) { if (lineHeightIndex == -1) initCSSPropertyIndexes(element); Value v = CSSUtilities.getComputedStyle(element, lineHeightIndex); if ((v == ValueConstants.INHERIT_VALUE) || (v == SVG12ValueConstants.NORMAL_VALUE)) { return fontSize*1.1f; } float lineHeight = v.getFloatValue(); if (v instanceof ComputedValue) v = ((ComputedValue)v).getComputedValue(); if ((v instanceof LineHeightValue) && ((LineHeightValue)v).getFontSizeRelative()) lineHeight *= fontSize; return lineHeight; }
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); }
protected float getLineHeight(BridgeContext ctx, Element element, float fontSize) { if (lineHeightIndex == -1) initCSSPropertyIndexes(element); Value v = CSSUtilities.getComputedStyle(element, lineHeightIndex); if ((v == ValueConstants.INHERIT_VALUE) || (v == SVG12ValueConstants.NORMAL_VALUE)) { return fontSize*1.1f; } float lineHeight = v.getFloatValue(); if (v instanceof ComputedValue) v = ((ComputedValue)v).getComputedValue(); if ((v instanceof LineHeightValue) && ((LineHeightValue)v).getFontSizeRelative()) lineHeight *= fontSize; return lineHeight; }
ov = style.getValue(i); if (ov instanceof ComputedValue) { ov = ((ComputedValue)ov).getCascadedValue();
protected float getLineHeight(BridgeContext ctx, Element element, float fontSize) { if (lineHeightIndex == -1) initCSSPropertyIndexes(element); Value v = CSSUtilities.getComputedStyle(element, lineHeightIndex); if ((v == ValueConstants.INHERIT_VALUE) || (v == SVG12ValueConstants.NORMAL_VALUE)) { return fontSize*1.1f; } float lineHeight = v.getFloatValue(); if (v instanceof ComputedValue) v = ((ComputedValue)v).getComputedValue(); if ((v instanceof LineHeightValue) && ((LineHeightValue)v).getFontSizeRelative()) lineHeight *= fontSize; return lineHeight; }
ov = style.getValue(i); if (ov instanceof ComputedValue) { ov = ((ComputedValue)ov).getCascadedValue();
ov = style.getValue(i); if (ov instanceof ComputedValue) { ov = ((ComputedValue)ov).getCascadedValue();