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

Unified Diff: Source/core/layout/svg/LayoutSVGResourceContainer.cpp

Issue 1331053002: Propagate resource-triggered repaints to text node children of <text> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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
« no previous file with comments | « LayoutTests/svg/repaint/text-pattern-update-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/svg/LayoutSVGResourceContainer.cpp
diff --git a/Source/core/layout/svg/LayoutSVGResourceContainer.cpp b/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
index c0366122d6e3f407adbbaca50e2da5219130eac7..14cb507061ade153234cad285c7314b8dea1b0ee 100644
--- a/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
+++ b/Source/core/layout/svg/LayoutSVGResourceContainer.cpp
@@ -164,9 +164,21 @@ void LayoutSVGResourceContainer::markClientForInvalidation(LayoutObject* client,
case BoundariesInvalidation:
client->setNeedsBoundariesUpdate();
break;
- case PaintInvalidation:
- client->setShouldDoFullPaintInvalidation();
+ case PaintInvalidation: {
+ PaintInvalidationReason reason = PaintInvalidationFull;
+ // Since LayoutSVGInlineTexts don't have SVGResources (they use their
+ // parent's), they will not be notified of changes to paint servers. So
+ // if the client is one that could have a LayoutSVGInlineText use a
+ // paint invalidation reason that will force paint invalidation of the
+ // entire <text>/<tspan>/... subtree.
+ // TODO(fs): Allowing LayoutSVGInlineTexts to have should allow them to
fs 2015/09/10 10:41:13 Unless you can tell me up-front that this won't wo
pdr. 2015/09/11 06:22:04 This seems reasonable to me. Ultra nit: missing a
fs 2015/09/11 16:32:16 I accidentally an entire word! Will fix if we end
+ // get direct invalidation notifications (while getting redundant ones
+ // for the parent text content element's.)
+ if (client->isSVGText() || client->isSVGInline())
+ reason = PaintInvalidationLocationChange;
pdr. 2015/09/11 06:22:04 This is pragmatic but I worry it could confuse us
fs 2015/09/11 16:32:16 Yes, I was pondering that, and decided against it
+ client->setShouldDoFullPaintInvalidation(reason);
break;
+ }
case ParentOnlyInvalidation:
break;
}
« no previous file with comments | « LayoutTests/svg/repaint/text-pattern-update-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698