| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // A real stacking context can also be a leaf if it doesn't contain any stacked | 91 // A real stacking context can also be a leaf if it doesn't contain any stacked |
| 92 // elements. | 92 // elements. |
| 93 class CORE_EXPORT PaintLayerStackingNode { | 93 class CORE_EXPORT PaintLayerStackingNode { |
| 94 USING_FAST_MALLOC(PaintLayerStackingNode); | 94 USING_FAST_MALLOC(PaintLayerStackingNode); |
| 95 WTF_MAKE_NONCOPYABLE(PaintLayerStackingNode); | 95 WTF_MAKE_NONCOPYABLE(PaintLayerStackingNode); |
| 96 | 96 |
| 97 public: | 97 public: |
| 98 explicit PaintLayerStackingNode(PaintLayer*); | 98 explicit PaintLayerStackingNode(PaintLayer*); |
| 99 ~PaintLayerStackingNode(); | 99 ~PaintLayerStackingNode(); |
| 100 | 100 |
| 101 int zIndex() const { return layoutObject()->style()->zIndex(); } | 101 int zIndex() const { return layoutObject().style()->zIndex(); } |
| 102 | 102 |
| 103 bool isStackingContext() const { | 103 bool isStackingContext() const { |
| 104 return layoutObject()->style()->isStackingContext(); | 104 return layoutObject().style()->isStackingContext(); |
| 105 } | 105 } |
| 106 | 106 |
| 107 // Whether the node is stacked. See documentation for the class about | 107 // Whether the node is stacked. See documentation for the class about |
| 108 // "stacked". For now every PaintLayer has a PaintLayerStackingNode, even if | 108 // "stacked". For now every PaintLayer has a PaintLayerStackingNode, even if |
| 109 // the layer is not stacked (e.g. a scrollable layer which is statically | 109 // the layer is not stacked (e.g. a scrollable layer which is statically |
| 110 // positioned and is not a stacking context). | 110 // positioned and is not a stacking context). |
| 111 bool isStacked() const { return m_isStacked; } | 111 bool isStacked() const { return m_isStacked; } |
| 112 | 112 |
| 113 // Update our normal and z-index lists. | 113 // Update our normal and z-index lists. |
| 114 void updateLayerListsIfNeeded(); | 114 void updateLayerListsIfNeeded(); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 m_stackingParent = stackingParent; | 169 m_stackingParent = stackingParent; |
| 170 } | 170 } |
| 171 #endif | 171 #endif |
| 172 | 172 |
| 173 bool isDirtyStackingContext() const { | 173 bool isDirtyStackingContext() const { |
| 174 return m_zOrderListsDirty && isStackingContext(); | 174 return m_zOrderListsDirty && isStackingContext(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 PaintLayerCompositor* compositor() const; | 177 PaintLayerCompositor* compositor() const; |
| 178 // We can't return a LayoutBox as LayoutInline can be a stacking context. | 178 // We can't return a LayoutBox as LayoutInline can be a stacking context. |
| 179 LayoutBoxModelObject* layoutObject() const; | 179 LayoutBoxModelObject& layoutObject() const; |
| 180 | 180 |
| 181 PaintLayer* m_layer; | 181 PaintLayer* m_layer; |
| 182 | 182 |
| 183 // m_posZOrderList holds a sorted list of all the descendant nodes within | 183 // m_posZOrderList holds a sorted list of all the descendant nodes within |
| 184 // that have z-indices of 0 (or is treated as 0 for positioned objects) or | 184 // that have z-indices of 0 (or is treated as 0 for positioned objects) or |
| 185 // greater. | 185 // greater. |
| 186 std::unique_ptr<Vector<PaintLayerStackingNode*>> m_posZOrderList; | 186 std::unique_ptr<Vector<PaintLayerStackingNode*>> m_posZOrderList; |
| 187 // m_negZOrderList holds descendants within our stacking context with | 187 // m_negZOrderList holds descendants within our stacking context with |
| 188 // negative z-indices. | 188 // negative z-indices. |
| 189 std::unique_ptr<Vector<PaintLayerStackingNode*>> m_negZOrderList; | 189 std::unique_ptr<Vector<PaintLayerStackingNode*>> m_negZOrderList; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 | 245 |
| 246 private: | 246 private: |
| 247 PaintLayerStackingNode* m_stackingNode; | 247 PaintLayerStackingNode* m_stackingNode; |
| 248 bool m_previousMutationAllowedState; | 248 bool m_previousMutationAllowedState; |
| 249 }; | 249 }; |
| 250 #endif | 250 #endif |
| 251 | 251 |
| 252 } // namespace blink | 252 } // namespace blink |
| 253 | 253 |
| 254 #endif // PaintLayerStackingNode_h | 254 #endif // PaintLayerStackingNode_h |
| OLD | NEW |