Chromium Code Reviews| Index: Source/core/css/SVGCSSComputedStyleDeclaration.cpp |
| diff --git a/Source/core/css/SVGCSSComputedStyleDeclaration.cpp b/Source/core/css/SVGCSSComputedStyleDeclaration.cpp |
| index fd03b7c4e35fdf7821bfe42f56b4b5ce757a98dc..11e508b1f605a76eac77d9fab3a54f87dfe8c698 100644 |
| --- a/Source/core/css/SVGCSSComputedStyleDeclaration.cpp |
| +++ b/Source/core/css/SVGCSSComputedStyleDeclaration.cpp |
| @@ -59,6 +59,28 @@ static PassRefPtr<CSSValue> strokeDashArrayToCSSValueList(const Vector<SVGLength |
| return list.release(); |
| } |
| +static PassRefPtr<CSSValue> paintOrderToCSSValueList(EPaintOrder paintorder) |
| +{ |
| + RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
| + do { |
| + EPaintOrderType paintOrderType = (EPaintOrderType)(paintorder & (1 << kPaintOrderBitwidth - 1)); |
| + switch (paintOrderType) { |
|
pdr.
2013/06/25 15:30:45
Nit: indent inside the switch statement.
|
| + case PT_FILL: |
| + case PT_STROKE: |
| + case PT_MARKERS: |
| + list->append(CSSPrimitiveValue::create(paintOrderType)); |
| + break; |
| + case PT_NONE: |
| + default: |
| + ASSERT_NOT_REACHED(); |
| + break; |
| + } |
| + } |
|
pdr.
2013/06/25 15:30:45
Nit: Our style is to leave the while loop on the s
|
| + while (paintorder <<= kPaintOrderBitwidth); |
| + |
| + return list.release(); |
| +} |
| + |
| PassRefPtr<SVGPaint> CSSComputedStyleDeclaration::adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint> newPaint, RenderStyle* style) const |
| { |
| RefPtr<SVGPaint> paint = newPaint; |
| @@ -191,6 +213,8 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getSVGPropertyCSSValue(CSSProp |
| } |
| case CSSPropertyWebkitSvgShadow: |
| return valueForShadow(svgStyle->shadow(), propertyID, style); |
| + case CSSPropertyPaintOrder: |
| + return paintOrderToCSSValueList(svgStyle->paintOrder()); |
| case CSSPropertyVectorEffect: |
| return CSSPrimitiveValue::create(svgStyle->vectorEffect()); |
| case CSSPropertyMaskType: |