Index: Source/core/rendering/svg/SVGInlineTextBox.cpp |
diff --git a/Source/core/rendering/svg/SVGInlineTextBox.cpp b/Source/core/rendering/svg/SVGInlineTextBox.cpp |
index c7be22fe7c993f42ef39d518c2a7166cb20741e4..8ce2f10c49dd553932816ddbf4b601ca1886b23a 100644 |
--- a/Source/core/rendering/svg/SVGInlineTextBox.cpp |
+++ b/Source/core/rendering/svg/SVGInlineTextBox.cpp |
@@ -543,17 +543,25 @@ void SVGInlineTextBox::paintDecoration(GraphicsContext* context, TextDecoration |
const SVGRenderStyle* svgDecorationStyle = decorationStyle->svgStyle(); |
ASSERT(svgDecorationStyle); |
- bool hasDecorationFill = svgDecorationStyle->hasFill(); |
- bool hasVisibleDecorationStroke = svgDecorationStyle->hasVisibleStroke(); |
- |
- if (hasDecorationFill) { |
- m_paintingResourceMode = ApplyToFillMode; |
- paintDecorationWithStyle(context, decoration, fragment, decorationRenderer); |
- } |
- |
- if (hasVisibleDecorationStroke) { |
- m_paintingResourceMode = ApplyToStrokeMode; |
- paintDecorationWithStyle(context, decoration, fragment, decorationRenderer); |
+ for (int i = 0; i < 3; i++) { |
pdr.
2014/04/08 14:20:57
Question: can we share this with the loop above (i
fs
2014/04/08 15:50:24
No, not as long as the stroke+fill for the decorat
|
+ switch (svgDecorationStyle->paintOrderType(i)) { |
+ case PT_FILL: |
+ if (svgDecorationStyle->hasFill()) { |
+ m_paintingResourceMode = ApplyToFillMode; |
+ paintDecorationWithStyle(context, decoration, fragment, decorationRenderer); |
+ } |
+ break; |
+ case PT_STROKE: |
+ if (svgDecorationStyle->hasVisibleStroke()) { |
+ m_paintingResourceMode = ApplyToStrokeMode; |
+ paintDecorationWithStyle(context, decoration, fragment, decorationRenderer); |
+ } |
+ break; |
+ case PT_MARKERS: |
+ break; |
+ default: |
+ ASSERT_NOT_REACHED(); |
+ } |
} |
} |