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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2598923002: Update transform paint property's transform-offset on element size changes (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index fb3c6cb78c8784e627960e94620930bb96a59171..a0433a9ac96c09ed46b3c831ff328fc6113dc81e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1703,12 +1703,18 @@ void LayoutBox::frameRectChanged() {
if (!needsLayout())
setMayNeedPaintInvalidation();
- // The overflow clip paint property depends on the border box rect through
- // overflowClipRect(). The border box rect's size equals the frame rect's
- // size, so we trigger a paint property update when the framerect changes.
- if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() &&
- shouldClipOverflow())
- setNeedsPaintPropertyUpdate();
+ if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
+ if (shouldClipOverflow()) {
+ // The overflow clip paint property depends on the border box rect through
+ // overflowClipRect(). The border box rect's size equals the frame rect's
+ // size so we trigger a paint property update when the frame rect changes.
+ setNeedsPaintPropertyUpdate();
+ } else if (hasTransformRelatedProperty()) {
Xianzhu 2016/12/22 05:10:11 I think the CL is fine to fix the layout test fail
+ // The transform paint property depends on the frame rect due to
+ // transform-origin so we trigger an update when the frame rect changes.
+ setNeedsPaintPropertyUpdate();
+ }
+ }
}
bool LayoutBox::intersectsVisibleViewport() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698