Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(598)

Unified Diff: third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp

Issue 2846513002: More targeted resource-switching mechanism for SVG selection painting (Closed)
Patch Set: Rebased onto dependent patch(es) Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698