Index: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
index a0a17d3962ef13e7d138575fc7b25be600a0f5ca..7c9237d6f295a9db8ba8c47edd437e860a7525fb 100644 |
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp |
@@ -9,6 +9,7 @@ |
#include "core/frame/Settings.h" |
#include "core/layout/LayoutInline.h" |
#include "core/layout/LayoutView.h" |
+#include "core/layout/compositing/CompositingReasonFinder.h" |
#include "core/layout/svg/LayoutSVGRoot.h" |
#include "core/paint/FindPropertiesNeedingUpdate.h" |
#include "core/paint/ObjectPaintProperties.h" |
@@ -319,6 +320,10 @@ void PaintPropertyTreeBuilder::updateTransform( |
if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) { |
const ComputedStyle& style = object.styleRef(); |
if (object.isBox() && (style.hasTransform() || style.preserves3D())) { |
+ CompositingReasons compositingReasons = CompositingReasonNone; |
+ if (CompositingReasonFinder::requiresCompositingForTransform(object)) |
+ compositingReasons |= CompositingReason3DTransform; |
+ |
TransformationMatrix matrix; |
style.applyTransform( |
matrix, toLayoutBox(object).size(), |
@@ -338,7 +343,8 @@ void PaintPropertyTreeBuilder::updateTransform( |
context.forceSubtreeUpdate |= properties.updateTransform( |
context.current.transform, matrix, |
transformOrigin(toLayoutBox(object)), |
- context.current.shouldFlattenInheritedTransform, renderingContextID); |
+ context.current.shouldFlattenInheritedTransform, renderingContextID, |
+ compositingReasons); |
} else { |
if (auto* properties = object.getMutableForPainting().paintProperties()) |
context.forceSubtreeUpdate |= properties->clearTransform(); |