}
}
+static PassRefPtr<CSSValue> strokeDashArrayToCSSValueList(const Vector<SVGLength>& dashes)
+{
+ if (dashes.isEmpty())
+ return CSSPrimitiveValue::createIdentifier(CSSValueNone);
+
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ const Vector<SVGLength>::const_iterator end = dashes.end();
+ for (Vector<SVGLength>::const_iterator it = dashes.begin(); it != end; ++it)
+ list->append(SVGLength::toCSSPrimitiveValue(*it));
+
+ return list.release();
+}
+
PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(int propertyID, EUpdateLayout updateLayout) const
{
Node* node = m_node.get();
case CSSPropertyWritingMode:
return CSSPrimitiveValue::create(svgStyle->writingMode());
case CSSPropertyClipPath:
- if (!svgStyle->clipPath().isEmpty())
- return CSSPrimitiveValue::create(svgStyle->clipPath(), CSSPrimitiveValue::CSS_URI);
+ if (!svgStyle->clipperResource().isEmpty())
+ return CSSPrimitiveValue::create(svgStyle->clipperResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyMask:
- if (!svgStyle->maskElement().isEmpty())
- return CSSPrimitiveValue::create(svgStyle->maskElement(), CSSPrimitiveValue::CSS_URI);
+ if (!svgStyle->maskerResource().isEmpty())
+ return CSSPrimitiveValue::create(svgStyle->maskerResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyFilter:
- if (!svgStyle->filter().isEmpty())
- return CSSPrimitiveValue::create(svgStyle->filter(), CSSPrimitiveValue::CSS_URI);
+ if (!svgStyle->filterResource().isEmpty())
+ return CSSPrimitiveValue::create(svgStyle->filterResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyFloodColor:
return CSSPrimitiveValue::createColor(svgStyle->floodColor().rgb());
case CSSPropertyFill:
return svgStyle->fillPaint();
case CSSPropertyKerning:
- return svgStyle->kerning();
+ return SVGLength::toCSSPrimitiveValue(svgStyle->kerning());
case CSSPropertyMarkerEnd:
- if (!svgStyle->endMarker().isEmpty())
- return CSSPrimitiveValue::create(svgStyle->endMarker(), CSSPrimitiveValue::CSS_URI);
+ if (!svgStyle->markerEndResource().isEmpty())
+ return CSSPrimitiveValue::create(svgStyle->markerEndResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyMarkerMid:
- if (!svgStyle->midMarker().isEmpty())
- return CSSPrimitiveValue::create(svgStyle->midMarker(), CSSPrimitiveValue::CSS_URI);
+ if (!svgStyle->markerMidResource().isEmpty())
+ return CSSPrimitiveValue::create(svgStyle->markerMidResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyMarkerStart:
- if (!svgStyle->startMarker().isEmpty())
- return CSSPrimitiveValue::create(svgStyle->startMarker(), CSSPrimitiveValue::CSS_URI);
+ if (!svgStyle->markerStartResource().isEmpty())
+ return CSSPrimitiveValue::create(svgStyle->markerStartResource(), CSSPrimitiveValue::CSS_URI);
return CSSPrimitiveValue::createIdentifier(CSSValueNone);
case CSSPropertyStroke:
return svgStyle->strokePaint();
case CSSPropertyStrokeDasharray:
- return svgStyle->strokeDashArray();
+ return strokeDashArrayToCSSValueList(svgStyle->strokeDashArray());
case CSSPropertyStrokeDashoffset:
- return svgStyle->strokeDashOffset();
+ return SVGLength::toCSSPrimitiveValue(svgStyle->strokeDashOffset());
case CSSPropertyStrokeWidth:
- return svgStyle->strokeWidth();
+ return SVGLength::toCSSPrimitiveValue(svgStyle->strokeWidth());
case CSSPropertyBaselineShift: {
switch (svgStyle->baselineShift()) {
case BS_BASELINE:
case BS_SUB:
return CSSPrimitiveValue::createIdentifier(CSSValueSub);
case BS_LENGTH:
- return svgStyle->baselineShiftValue();
+ return SVGLength::toCSSPrimitiveValue(svgStyle->baselineShiftValue());
}
}
case CSSPropertyGlyphOrientationHorizontal:
return 0;
}
- case CSSPropertyWebkitShadow:
+ case CSSPropertyWebkitSvgShadow:
return valueForShadow(svgStyle->shadow(), propertyID);
+ case CSSPropertyVectorEffect:
+ return CSSPrimitiveValue::create(svgStyle->vectorEffect());
case CSSPropertyMarker:
case CSSPropertyEnableBackground:
case CSSPropertyColorProfile: