OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
4 * | 4 * |
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
6 * | 6 * |
7 * Other contributors: | 7 * Other contributors: |
8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 class LayerCompositor; | 56 class LayerCompositor; |
57 class LayoutStyle; | 57 class LayoutStyle; |
58 class LayoutBoxModelObject; | 58 class LayoutBoxModelObject; |
59 | 59 |
60 class LayerStackingNode { | 60 class LayerStackingNode { |
61 WTF_MAKE_NONCOPYABLE(LayerStackingNode); | 61 WTF_MAKE_NONCOPYABLE(LayerStackingNode); |
62 public: | 62 public: |
63 explicit LayerStackingNode(Layer*); | 63 explicit LayerStackingNode(Layer*); |
64 ~LayerStackingNode(); | 64 ~LayerStackingNode(); |
65 | 65 |
66 int zIndex() const { return renderer()->style()->zIndex(); } | 66 int zIndex() const { return layoutObject()->style()->zIndex(); } |
67 | 67 |
68 // A stacking context is a layer that has a non-auto z-index. | 68 // A stacking context is a layer that has a non-auto z-index. |
69 bool isStackingContext() const { return !renderer()->style()->hasAutoZIndex(
); } | 69 bool isStackingContext() const { return !layoutObject()->style()->hasAutoZIn
dex(); } |
70 | 70 |
71 // Update our normal and z-index lists. | 71 // Update our normal and z-index lists. |
72 void updateLayerListsIfNeeded(); | 72 void updateLayerListsIfNeeded(); |
73 | 73 |
74 bool zOrderListsDirty() const { return m_zOrderListsDirty; } | 74 bool zOrderListsDirty() const { return m_zOrderListsDirty; } |
75 void dirtyZOrderLists(); | 75 void dirtyZOrderLists(); |
76 void updateZOrderLists(); | 76 void updateZOrderLists(); |
77 void clearZOrderLists(); | 77 void clearZOrderLists(); |
78 void dirtyStackingContextZOrderLists(); | 78 void dirtyStackingContextZOrderLists(); |
79 | 79 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 #endif | 134 #endif |
135 | 135 |
136 bool shouldBeNormalFlowOnly() const; | 136 bool shouldBeNormalFlowOnly() const; |
137 | 137 |
138 void updateNormalFlowList(); | 138 void updateNormalFlowList(); |
139 | 139 |
140 bool isDirtyStackingContext() const { return m_zOrderListsDirty && isStackin
gContext(); } | 140 bool isDirtyStackingContext() const { return m_zOrderListsDirty && isStackin
gContext(); } |
141 | 141 |
142 LayerCompositor* compositor() const; | 142 LayerCompositor* compositor() const; |
143 // We can't return a LayoutBox as LayoutInline can be a stacking context. | 143 // We can't return a LayoutBox as LayoutInline can be a stacking context. |
144 LayoutBoxModelObject* renderer() const; | 144 LayoutBoxModelObject* layoutObject() const; |
145 | 145 |
146 Layer* m_layer; | 146 Layer* m_layer; |
147 | 147 |
148 // m_posZOrderList holds a sorted list of all the descendant nodes within | 148 // m_posZOrderList holds a sorted list of all the descendant nodes within |
149 // that have z-indices of 0 or greater (auto will count as 0). | 149 // that have z-indices of 0 or greater (auto will count as 0). |
150 // m_negZOrderList holds descendants within our stacking context with | 150 // m_negZOrderList holds descendants within our stacking context with |
151 // negative z-indices. | 151 // negative z-indices. |
152 OwnPtr<Vector<LayerStackingNode*>> m_posZOrderList; | 152 OwnPtr<Vector<LayerStackingNode*>> m_posZOrderList; |
153 OwnPtr<Vector<LayerStackingNode*>> m_negZOrderList; | 153 OwnPtr<Vector<LayerStackingNode*>> m_negZOrderList; |
154 | 154 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 208 |
209 private: | 209 private: |
210 LayerStackingNode* m_stackingNode; | 210 LayerStackingNode* m_stackingNode; |
211 bool m_previousMutationAllowedState; | 211 bool m_previousMutationAllowedState; |
212 }; | 212 }; |
213 #endif | 213 #endif |
214 | 214 |
215 } // namespace blink | 215 } // namespace blink |
216 | 216 |
217 #endif // LayerStackingNode_h | 217 #endif // LayerStackingNode_h |
OLD | NEW |