| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/PaintPropertyTreeBuilder.h" | 5 #include "core/paint/PaintPropertyTreeBuilder.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/LocalFrame.h" | 8 #include "core/frame/LocalFrame.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/layout/LayoutInline.h" | 10 #include "core/layout/LayoutInline.h" |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 compositingReasons |= CompositingReason3DTransform; | 311 compositingReasons |= CompositingReason3DTransform; |
| 312 | 312 |
| 313 if (CompositingReasonFinder::requiresCompositingForTransformAnimation( | 313 if (CompositingReasonFinder::requiresCompositingForTransformAnimation( |
| 314 object.styleRef())) | 314 object.styleRef())) |
| 315 compositingReasons |= CompositingReasonActiveAnimation; | 315 compositingReasons |= CompositingReasonActiveAnimation; |
| 316 | 316 |
| 317 if (object.styleRef().hasWillChangeCompositingHint() && | 317 if (object.styleRef().hasWillChangeCompositingHint() && |
| 318 !object.styleRef().subtreeWillChangeContents()) | 318 !object.styleRef().subtreeWillChangeContents()) |
| 319 compositingReasons |= CompositingReasonWillChangeCompositingHint; | 319 compositingReasons |= CompositingReasonWillChangeCompositingHint; |
| 320 | 320 |
| 321 if (object.isBoxModelObject()) { |
| 322 const LayoutBoxModelObject* box = toLayoutBoxModelObject(&object); |
| 323 if (box->hasLayer()) { |
| 324 // TODO(chrishtr): move this to the descendant-dependent flags recursion |
| 325 // PaintLayer::updateDescendantDependentFlags. |
| 326 box->layer()->update3DTransformedDescendantStatus(); |
| 327 |
| 328 if (box->layer()->has3DTransformedDescendant()) |
| 329 compositingReasons |= CompositingReason3DTransform; |
| 330 } |
| 331 } |
| 332 |
| 321 return compositingReasons; | 333 return compositingReasons; |
| 322 } | 334 } |
| 323 | 335 |
| 324 static FloatPoint3D transformOrigin(const LayoutBox& box) { | 336 static FloatPoint3D transformOrigin(const LayoutBox& box) { |
| 325 const ComputedStyle& style = box.styleRef(); | 337 const ComputedStyle& style = box.styleRef(); |
| 326 // Transform origin has no effect without a transform or motion path. | 338 // Transform origin has no effect without a transform or motion path. |
| 327 if (!style.hasTransform()) | 339 if (!style.hasTransform()) |
| 328 return FloatPoint3D(); | 340 return FloatPoint3D(); |
| 329 FloatSize borderBoxSize(box.size()); | 341 FloatSize borderBoxSize(box.size()); |
| 330 return FloatPoint3D( | 342 return FloatPoint3D( |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 updateOverflowClip(object, context); | 983 updateOverflowClip(object, context); |
| 972 updatePerspective(object, context); | 984 updatePerspective(object, context); |
| 973 updateSvgLocalToBorderBoxTransform(object, context); | 985 updateSvgLocalToBorderBoxTransform(object, context); |
| 974 updateScrollAndScrollTranslation(object, context); | 986 updateScrollAndScrollTranslation(object, context); |
| 975 updateOutOfFlowContext(object, context); | 987 updateOutOfFlowContext(object, context); |
| 976 | 988 |
| 977 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 989 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
| 978 } | 990 } |
| 979 | 991 |
| 980 } // namespace blink | 992 } // namespace blink |
| OLD | NEW |