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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 bool hasPositiveZOrderList() const { return posZOrderList() && posZOrderList
()->size(); } | 79 bool hasPositiveZOrderList() const { return posZOrderList() && posZOrderList
()->size(); } |
80 bool hasNegativeZOrderList() const { return negZOrderList() && negZOrderList
()->size(); } | 80 bool hasNegativeZOrderList() const { return negZOrderList() && negZOrderList
()->size(); } |
81 | 81 |
82 // FIXME: should check for dirtiness here? | 82 // FIXME: should check for dirtiness here? |
83 bool isNormalFlowOnly() const { return m_isNormalFlowOnly; } | 83 bool isNormalFlowOnly() const { return m_isNormalFlowOnly; } |
84 void updateIsNormalFlowOnly(); | 84 void updateIsNormalFlowOnly(); |
85 bool normalFlowListDirty() const { return m_normalFlowListDirty; } | 85 bool normalFlowListDirty() const { return m_normalFlowListDirty; } |
86 void dirtyNormalFlowList(); | 86 void dirtyNormalFlowList(); |
87 | 87 |
88 enum PaintOrderListType {BeforePromote, AfterPromote}; | |
89 void computePaintOrderList(PaintOrderListType, Vector<RefPtr<Node> >&); | |
90 | |
91 void updateStackingNodesAfterStyleChange(const RenderStyle* oldStyle); | 88 void updateStackingNodesAfterStyleChange(const RenderStyle* oldStyle); |
92 | 89 |
93 RenderLayerStackingNode* ancestorStackingContextNode() const; | 90 RenderLayerStackingNode* ancestorStackingContextNode() const; |
94 RenderLayerStackingNode* ancestorStackingNode() const; | |
95 | 91 |
96 // Gets the enclosing stacking context for this node, possibly the node | 92 // Gets the enclosing stacking context for this node, possibly the node |
97 // itself, if it is a stacking context. | 93 // itself, if it is a stacking context. |
98 RenderLayerStackingNode* enclosingStackingContextNode() { return isStackingC
ontext() ? this : ancestorStackingContextNode(); } | 94 RenderLayerStackingNode* enclosingStackingContextNode() { return isStackingC
ontext() ? this : ancestorStackingContextNode(); } |
99 | 95 |
100 RenderLayer* layer() const { return m_layer; } | 96 RenderLayer* layer() const { return m_layer; } |
101 | 97 |
102 #if !ASSERT_DISABLED | 98 #if !ASSERT_DISABLED |
103 bool layerListMutationAllowed() const { return m_layerListMutationAllowed; } | 99 bool layerListMutationAllowed() const { return m_layerListMutationAllowed; } |
104 void setLayerListMutationAllowed(bool flag) { m_layerListMutationAllowed = f
lag; } | 100 void setLayerListMutationAllowed(bool flag) { m_layerListMutationAllowed = f
lag; } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 void updateNormalFlowList(); | 141 void updateNormalFlowList(); |
146 | 142 |
147 bool isDirtyStackingContext() const { return m_zOrderListsDirty && isStackin
gContext(); } | 143 bool isDirtyStackingContext() const { return m_zOrderListsDirty && isStackin
gContext(); } |
148 | 144 |
149 RenderLayerCompositor* compositor() const; | 145 RenderLayerCompositor* compositor() const; |
150 // FIXME: Investigate changing this to Renderbox. | 146 // FIXME: Investigate changing this to Renderbox. |
151 RenderLayerModelObject* renderer() const; | 147 RenderLayerModelObject* renderer() const; |
152 | 148 |
153 RenderLayer* m_layer; | 149 RenderLayer* m_layer; |
154 | 150 |
155 // For stacking contexts, m_posZOrderList holds a sorted list of all the | 151 // m_posZOrderList holds a sorted list of all the descendant nodes within |
156 // descendant nodes within the stacking context that have z-indices of 0 or
greater | 152 // that have z-indices of 0 or greater (auto will count as 0). |
157 // (auto will count as 0). m_negZOrderList holds descendants within our stac
king context with negative | 153 // m_negZOrderList holds descendants within our stacking context with |
158 // z-indices. | 154 // negative z-indices. |
159 OwnPtr<Vector<RenderLayerStackingNode*> > m_posZOrderList; | 155 OwnPtr<Vector<RenderLayerStackingNode*> > m_posZOrderList; |
160 OwnPtr<Vector<RenderLayerStackingNode*> > m_negZOrderList; | 156 OwnPtr<Vector<RenderLayerStackingNode*> > m_negZOrderList; |
161 | 157 |
162 // This list contains child nodes that cannot create stacking contexts. For
now it is just | 158 // This list contains child nodes that cannot create stacking contexts. |
163 // overflow layers, but that may change in the future. | |
164 OwnPtr<Vector<RenderLayerStackingNode*> > m_normalFlowList; | 159 OwnPtr<Vector<RenderLayerStackingNode*> > m_normalFlowList; |
165 | 160 |
166 // If this is true, then no non-descendant appears between any of our | |
167 // descendants in stacking order. This is one of the requirements of being | |
168 // able to safely become a stacking context. | |
169 unsigned m_descendantsAreContiguousInStackingOrder : 1; | |
170 unsigned m_descendantsAreContiguousInStackingOrderDirty : 1; | |
171 | |
172 unsigned m_zOrderListsDirty : 1; | 161 unsigned m_zOrderListsDirty : 1; |
173 unsigned m_normalFlowListDirty: 1; | 162 unsigned m_normalFlowListDirty: 1; |
174 unsigned m_isNormalFlowOnly : 1; | 163 unsigned m_isNormalFlowOnly : 1; |
175 | 164 |
176 #if !ASSERT_DISABLED | 165 #if !ASSERT_DISABLED |
177 unsigned m_layerListMutationAllowed : 1; | 166 unsigned m_layerListMutationAllowed : 1; |
178 RenderLayerStackingNode* m_stackingParent; | 167 RenderLayerStackingNode* m_stackingParent; |
179 #endif | 168 #endif |
180 }; | 169 }; |
181 | 170 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 211 |
223 private: | 212 private: |
224 RenderLayerStackingNode* m_stackingNode; | 213 RenderLayerStackingNode* m_stackingNode; |
225 bool m_previousMutationAllowedState; | 214 bool m_previousMutationAllowedState; |
226 }; | 215 }; |
227 #endif | 216 #endif |
228 | 217 |
229 } // namespace WebCore | 218 } // namespace WebCore |
230 | 219 |
231 #endif // RenderLayerStackingNode_h | 220 #endif // RenderLayerStackingNode_h |
OLD | NEW |