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

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

Issue 2602453002: Update perspective paint properties on perspective-origin changes (Closed)
Patch Set: Update comment, add a relative length update test 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 6c5c3933c8550867b15c31f74fc00c9f1c702ef3..1eebc1b557dab4a18f721c675e22dd59d511a614 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1709,10 +1709,12 @@ void LayoutBox::frameRectChanged() {
// 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(...).
+ } else if (styleRef().hasTransform() || styleRef().hasPerspective()) {
+ // Relative lengths (e.g., percentage values) in transform, perspective,
+ // transform-origin, and perspective-origin can depend on the size of the
+ // frame rect, so force a property update if it changes.
+ // TODO(pdr): We only need to update properties if there are relative
+ // lengths.
setNeedsPaintPropertyUpdate();
}
}
« 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