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 <memory> | 7 #include <memory> |
8 #include "core/dom/DOMNodeIds.h" | 8 #include "core/dom/DOMNodeIds.h" |
9 #include "core/frame/FrameView.h" | 9 #include "core/frame/FrameView.h" |
10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 std::move(localTransformSpace), clipRect); | 66 std::move(localTransformSpace), clipRect); |
67 return false; | 67 return false; |
68 } | 68 } |
69 frameView.setContentClip(ClipPaintPropertyNode::create( | 69 frameView.setContentClip(ClipPaintPropertyNode::create( |
70 std::move(parent), std::move(localTransformSpace), clipRect)); | 70 std::move(parent), std::move(localTransformSpace), clipRect)); |
71 return true; | 71 return true; |
72 } | 72 } |
73 | 73 |
74 static CompositorElementId createDomNodeBasedCompositorElementId( | 74 static CompositorElementId createDomNodeBasedCompositorElementId( |
75 const LayoutObject& object) { | 75 const LayoutObject& object) { |
| 76 // TODO(wkorman): Centralize this implementation with similar across |
| 77 // animation, scrolling and compositing logic. |
76 return createCompositorElementId(DOMNodeIds::idForNode(object.node()), | 78 return createCompositorElementId(DOMNodeIds::idForNode(object.node()), |
77 CompositorSubElementId::Primary); | 79 CompositorSubElementId::Primary); |
78 } | 80 } |
79 | 81 |
80 // True if a new property was created or a main thread scrolling reason changed | 82 // True if a new property was created or a main thread scrolling reason changed |
81 // (which can affect descendants), false if an existing one was updated. | 83 // (which can affect descendants), false if an existing one was updated. |
82 static bool updateScrollTranslation( | 84 static bool updateScrollTranslation( |
83 FrameView& frameView, | 85 FrameView& frameView, |
84 PassRefPtr<const TransformPaintPropertyNode> parent, | 86 PassRefPtr<const TransformPaintPropertyNode> parent, |
85 const TransformationMatrix& matrix, | 87 const TransformationMatrix& matrix, |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 updateOverflowClip(object, context); | 1126 updateOverflowClip(object, context); |
1125 updatePerspective(object, context); | 1127 updatePerspective(object, context); |
1126 updateSvgLocalToBorderBoxTransform(object, context); | 1128 updateSvgLocalToBorderBoxTransform(object, context); |
1127 updateScrollAndScrollTranslation(object, context); | 1129 updateScrollAndScrollTranslation(object, context); |
1128 updateOutOfFlowContext(object, context); | 1130 updateOutOfFlowContext(object, context); |
1129 | 1131 |
1130 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); | 1132 context.forceSubtreeUpdate |= object.subtreeNeedsPaintPropertyUpdate(); |
1131 } | 1133 } |
1132 | 1134 |
1133 } // namespace blink | 1135 } // namespace blink |
OLD | NEW |