Index: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp |
diff --git a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp |
index c0eb9eaf0b399da78bcf8a74d95cfc5ef49cce7c..65fc6c73a391338f289b6aecf6b23e14278c7d9e 100644 |
--- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp |
+++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp |
@@ -521,23 +521,15 @@ void SVGInlineTextBoxPainter::PaintText(const PaintInfo& paint_info, |
// Draw text using selection style from the start to the end position of the |
// selection. |
- if (style != selection_style) { |
- StyleDifference diff; |
- diff.SetNeedsPaintInvalidationObject(); |
- SVGResourcesCache::ClientStyleChanged(&ParentInlineLayoutObject(), diff, |
- selection_style); |
- } |
- |
- PaintFlags flags; |
- if (SetupTextPaint(paint_info, selection_style, resource_mode, flags)) |
- PaintText(paint_info, text_run, fragment, start_position, end_position, |
- flags); |
+ { |
+ SVGResourcesCache::TemporaryStyleScope scope(ParentInlineLayoutObject(), |
+ style, selection_style); |
- if (style != selection_style) { |
- StyleDifference diff; |
- diff.SetNeedsPaintInvalidationObject(); |
- SVGResourcesCache::ClientStyleChanged(&ParentInlineLayoutObject(), diff, |
- style); |
+ PaintFlags flags; |
+ if (SetupTextPaint(paint_info, selection_style, resource_mode, flags)) { |
+ PaintText(paint_info, text_run, fragment, start_position, end_position, |
+ flags); |
+ } |
} |
// Eventually draw text using regular style from the end position of the |