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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp

Issue 2397003002: Mark children of an SVG root as needing paint invalidation checking on resize. (Closed)
Patch Set: none Created 4 years, 2 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/layout/svg/LayoutSVGRoot.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
index 285aa44af64a71b6c83b90ad5e4e66531e9676bc..beee92bad6166c27a3e5236d8fcaa7b40bf888e1 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
@@ -155,6 +155,11 @@ void LayoutSVGRoot::layout() {
m_isLayoutSizeChanged =
svg->hasRelativeLengths() && (selfNeedsLayout() || oldSize != size());
+ // The scale of one or more of the SVG elements may have changed, so mark
+ // the entire subtree as needing paint invalidation checking.
+ if (m_isLayoutSizeChanged)
fs 2016/10/06 10:51:49 I think this predicate may trigger over-invalidati
chrishtr 2016/10/06 20:08:37 Sorry, I accidentally missed this comment. Can yo
fs 2016/10/06 20:14:46 Something like resize-svg-invalidate-children.html
+ setMayNeedPaintInvalidationSubtree();
+
SVGLayoutSupport::layoutChildren(
firstChild(), false, m_didScreenScaleFactorChange, m_isLayoutSizeChanged);

Powered by Google App Engine
This is Rietveld 408576698