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

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 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..480406b8913d4fd9f3456f0deb1c274eca9c4453 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()) {
+ // Both transform-origin and perspective-origin can change if they use
+ // relative lengths and the frame rect changes.
+ // See: PaintPropertyTreeBuilder's updateTransform and updatePerspective.
+ // TODO(pdr): We only need to update properties if the origin is specified
+ // with relative lengths (e.g., percentage).
Xianzhu 2016/12/22 21:55:15 Nit: Other transform components can also be relati
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