Chromium Code Reviews| 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 67c02561988d3d17728f4b335b02f5e012a64df2..e966865b73ae0c58e90d7c7b2a75ca94c5bf4a61 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(), |
|
chrishtr
2017/04/28 18:39:23
How about instead teaching the SVG painting code t
fs
2017/04/28 18:59:52
Yes, that's what I'd like to be able to do eventua
chrishtr
2017/04/28 19:59:39
ok
|
| + 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 |