Chromium Code Reviews| 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(); |
| } |
| } |