Chromium Code Reviews| 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.
|