OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CompositingInputsUpdater_h | 5 #ifndef CompositingInputsUpdater_h |
6 #define CompositingInputsUpdater_h | 6 #define CompositingInputsUpdater_h |
7 | 7 |
8 #include "core/layout/LayoutGeometryMap.h" | 8 #include "core/layout/LayoutGeometryMap.h" |
9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 static void assertNeedsCompositingInputsUpdateBitsCleared(PaintLayer*); | 24 static void assertNeedsCompositingInputsUpdateBitsCleared(PaintLayer*); |
25 #endif | 25 #endif |
26 | 26 |
27 private: | 27 private: |
28 enum UpdateType { | 28 enum UpdateType { |
29 DoNotForceUpdate, | 29 DoNotForceUpdate, |
30 ForceUpdate, | 30 ForceUpdate, |
31 }; | 31 }; |
32 | 32 |
33 struct AncestorInfo { | 33 struct AncestorInfo { |
34 AncestorInfo() | 34 explicit AncestorInfo(PaintLayer* rootLayer) |
35 : ancestorStackingContext(nullptr) | 35 : ancestorStackingContext(nullptr) |
36 , enclosingCompositedLayer(nullptr) | 36 , enclosingCompositedLayer(nullptr) |
| 37 , lastOverflowLayer(rootLayer) |
37 , lastScrollingAncestor(nullptr) | 38 , lastScrollingAncestor(nullptr) |
38 , hasAncestorWithClipRelatedProperty(false) | 39 , hasAncestorWithClipRelatedProperty(false) |
39 , hasAncestorWithClipPath(false) | 40 , hasAncestorWithClipPath(false) |
40 { | 41 { |
41 } | 42 } |
42 | 43 |
43 PaintLayer* ancestorStackingContext; | 44 PaintLayer* ancestorStackingContext; |
44 PaintLayer* enclosingCompositedLayer; | 45 PaintLayer* enclosingCompositedLayer; |
| 46 PaintLayer* lastOverflowLayer; |
45 // Notice that lastScrollingAncestor isn't the same thing as | 47 // Notice that lastScrollingAncestor isn't the same thing as |
46 // ancestorScrollingLayer. The former is just the nearest scrolling | 48 // ancestorScrollingLayer. The former is just the nearest scrolling |
47 // along the PaintLayer::parent() chain. The latter is the layer that | 49 // along the PaintLayer::parent() chain. The latter is the layer that |
48 // actually controls the scrolling of this layer, which we find on the | 50 // actually controls the scrolling of this layer, which we find on the |
49 // containing block chain. | 51 // containing block chain. |
50 PaintLayer* lastScrollingAncestor; | 52 PaintLayer* lastScrollingAncestor; |
51 bool hasAncestorWithClipRelatedProperty; | 53 bool hasAncestorWithClipRelatedProperty; |
52 bool hasAncestorWithClipPath; | 54 bool hasAncestorWithClipPath; |
53 }; | 55 }; |
54 | 56 |
55 void updateRecursive(PaintLayer*, UpdateType, AncestorInfo); | 57 void updateRecursive(PaintLayer*, UpdateType, AncestorInfo); |
56 | 58 |
57 LayoutGeometryMap m_geometryMap; | 59 LayoutGeometryMap m_geometryMap; |
58 PaintLayer* m_rootLayer; | 60 PaintLayer* m_rootLayer; |
59 }; | 61 }; |
60 | 62 |
61 } // namespace blink | 63 } // namespace blink |
62 | 64 |
63 #endif // CompositingInputsUpdater_h | 65 #endif // CompositingInputsUpdater_h |
OLD | NEW |