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

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

Issue 1907333002: Order bounds update correctly for LayoutSVGShape and LayoutSVGImage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
index ccb9c174c603764b7fa3599a0641e7c4a915b022..7836bb1cbfeac1633c95f4272ff8049f21538d83 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
@@ -81,25 +81,26 @@ void LayoutSVGImage::layout()
updateBoundingBox();
- bool transformOrBoundariesUpdate = m_needsTransformUpdate || m_needsBoundariesUpdate;
+ bool updateParentBoundaries = false;
if (m_needsTransformUpdate) {
m_localTransform = toSVGImageElement(element())->calculateAnimatedLocalTransform();
m_needsTransformUpdate = false;
+ updateParentBoundaries = true;
}
+ // Invalidate all resources of this client if our layout changed.
pdr. 2016/04/22 22:33:33 It's a little confusing to have this in different
fs 2016/04/22 22:53:07 I hope we can... (This is pretty side-effecty - as
+ if (everHadLayout() && selfNeedsLayout())
+ SVGResourcesCache::clientLayoutChanged(this);
+
if (m_needsBoundariesUpdate) {
m_paintInvalidationBoundingBox = m_objectBoundingBox;
SVGLayoutSupport::intersectPaintInvalidationRectWithResources(this, m_paintInvalidationBoundingBox);
-
m_needsBoundariesUpdate = false;
+ updateParentBoundaries = true;
}
- // Invalidate all resources of this client if our layout changed.
- if (everHadLayout() && selfNeedsLayout())
- SVGResourcesCache::clientLayoutChanged(this);
-
// If our bounds changed, notify the parents.
- if (transformOrBoundariesUpdate)
+ if (updateParentBoundaries)
LayoutSVGModelObject::setNeedsBoundariesUpdate();
clearNeedsLayout();
pdr. 2016/04/22 22:33:33 Possibly assert here (and in the other functions)
fs 2016/04/22 22:53:07 Yeah, that's probably a good idea.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698