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

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: Only create transform-origin when needed 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 | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp » ('j') | 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..8f870a56682267b3570d8fdba7db980bd4da1319 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1703,12 +1703,19 @@ 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 (styleRef().hasTransform()) {
+ // The transform paint property's origin depends on the frame rect because
+ // transform-origin can be sized with lengths relative to the frame rect.
+ // See: PaintPropertyTreeBuilder::updateTransform(...).
Xianzhu 2016/12/22 17:28:41 Just thought of 1. perspective-origin has the same
+ setNeedsPaintPropertyUpdate();
+ }
+ }
}
bool LayoutBox::intersectsVisibleViewport() const {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698