| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 compositingReasons |= CompositingReason3DTransform; | 312 compositingReasons |= CompositingReason3DTransform; |
| 313 | 313 |
| 314 if (CompositingReasonFinder::requiresCompositingForTransformAnimation( | 314 if (CompositingReasonFinder::requiresCompositingForTransformAnimation( |
| 315 object.styleRef())) | 315 object.styleRef())) |
| 316 compositingReasons |= CompositingReasonActiveAnimation; | 316 compositingReasons |= CompositingReasonActiveAnimation; |
| 317 | 317 |
| 318 if (object.styleRef().hasWillChangeCompositingHint() && | 318 if (object.styleRef().hasWillChangeCompositingHint() && |
| 319 !object.styleRef().subtreeWillChangeContents()) | 319 !object.styleRef().subtreeWillChangeContents()) |
| 320 compositingReasons |= CompositingReasonWillChangeCompositingHint; | 320 compositingReasons |= CompositingReasonWillChangeCompositingHint; |
| 321 | 321 |
| 322 if (object.isBoxModelObject()) { |
| 323 const LayoutBoxModelObject* box = toLayoutBoxModelObject(&object); |
| 324 if (box->hasLayer()) { |
| 325 // TODO(chrishtr): move this to the descendant-dependent flags recursion |
| 326 // PaintLayer::updateDescendantDependentFlags. |
| 327 box->layer()->update3DTransformedDescendantStatus(); |
| 328 |
| 329 if (box->layer()->has3DTransformedDescendant()) |
| 330 compositingReasons |= CompositingReason3DTransform; |
| 331 } |
| 332 } |
| 333 |
| 322 return compositingReasons; | 334 return compositingReasons; |
| 323 } | 335 } |
| 324 | 336 |
| 325 static FloatPoint3D transformOrigin(const LayoutBox& box) { | 337 static FloatPoint3D transformOrigin(const LayoutBox& box) { |
| 326 const ComputedStyle& style = box.styleRef(); | 338 const ComputedStyle& style = box.styleRef(); |
| 327 // Transform origin has no effect without a transform or motion path. | 339 // Transform origin has no effect without a transform or motion path. |
| 328 if (!style.hasTransform()) | 340 if (!style.hasTransform()) |
| 329 return FloatPoint3D(); | 341 return FloatPoint3D(); |
| 330 FloatSize borderBoxSize(box.size()); | 342 FloatSize borderBoxSize(box.size()); |
| 331 return FloatPoint3D( | 343 return FloatPoint3D( |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 updateOverflowClip(object, context); | 988 updateOverflowClip(object, context); |
| 977 updatePerspective(object, context); | 989 updatePerspective(object, context); |
| 978 updateSvgLocalToBorderBoxTransform(object, context); | 990 updateSvgLocalToBorderBoxTransform(object, context); |
| 979 updateScrollAndScrollTranslation(object, context); | 991 updateScrollAndScrollTranslation(object, context); |
| 980 updateOutOfFlowContext(object, context); | 992 updateOutOfFlowContext(object, context); |
| 981 | 993 |
| 982 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 994 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
| 983 } | 995 } |
| 984 | 996 |
| 985 } // namespace blink | 997 } // namespace blink |
| OLD | NEW |