Chromium Code Reviews| 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; |
| } |