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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include "wtf/OwnPtr.h" | 51 #include "wtf/OwnPtr.h" |
52 #include "wtf/Vector.h" | 52 #include "wtf/Vector.h" |
53 | 53 |
54 namespace blink { | 54 namespace blink { |
55 | 55 |
56 class DeprecatedPaintLayer; | 56 class DeprecatedPaintLayer; |
57 class DeprecatedPaintLayerCompositor; | 57 class DeprecatedPaintLayerCompositor; |
58 class ComputedStyle; | 58 class ComputedStyle; |
59 class LayoutBoxModelObject; | 59 class LayoutBoxModelObject; |
60 | 60 |
61 // DeprecatedPaintLayerStackingNode represents anything that is treated as a | |
62 // stacking context. | |
63 // | |
64 // Stacking contexts are the basis for the CSS painting algorithm. The paint | |
65 // order is determined by walking stacking contexts (or elements treated like a | |
66 // stacking context like positioned objects or floats) in an order defined by | |
67 // ‘z-index’. This walk is interleaved with content that is not a stacking. | |
68 // context. See CSS 2.1 appendix E for the actual algorithm | |
69 // http://www.w3.org/TR/CSS21/zindex.html | |
70 // See also DeprecatedPaintLayerPainter (in particular paintLayerContents) for | |
71 // our implementation of the walk. | |
72 // | |
73 // Stacking contexts form a subtree over the layout tree. Ideally we would want | |
74 // objects of this class to be a node in this tree but there are potential | |
75 // issues with stale pointers so we rely on DeprecatedPaintLayer's tree | |
76 // structure. | |
77 // | |
78 // This class's purpose is to represent a node in the stacking context tree | |
79 // (aka paint tree). It currently caches the z-order lists for painting and | |
80 // hit-testing. | |
81 // | |
82 // To implement any z-order list iterations, use | |
83 // DeprecatedPaintLayerStackingNodeIterator and | |
84 // DeprecatedPaintLayerStackingNodeReverseIterator. | |
85 // | |
86 // This class is NOT DEPRECATED, DeprecatedPaintLayer is and we match its | |
87 // naming. | |
88 class CORE_EXPORT DeprecatedPaintLayerStackingNode { | 61 class CORE_EXPORT DeprecatedPaintLayerStackingNode { |
89 WTF_MAKE_FAST_ALLOCATED(DeprecatedPaintLayerStackingNode); | 62 WTF_MAKE_FAST_ALLOCATED(DeprecatedPaintLayerStackingNode); |
90 WTF_MAKE_NONCOPYABLE(DeprecatedPaintLayerStackingNode); | 63 WTF_MAKE_NONCOPYABLE(DeprecatedPaintLayerStackingNode); |
91 public: | 64 public: |
92 explicit DeprecatedPaintLayerStackingNode(LayoutBoxModelObject&); | 65 explicit DeprecatedPaintLayerStackingNode(LayoutBoxModelObject&); |
93 ~DeprecatedPaintLayerStackingNode(); | 66 ~DeprecatedPaintLayerStackingNode(); |
94 | 67 |
95 int zIndex() const { return layoutObject().style()->zIndex(); } | 68 int zIndex() const { return layoutObject().style()->zIndex(); } |
96 | 69 |
97 bool isStackingContext() const { return layoutObject().style()->isStackingCo
ntext(); } | 70 bool isStackingContext() const { return layoutObject().style()->isStackingCo
ntext(); } |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 193 |
221 private: | 194 private: |
222 DeprecatedPaintLayerStackingNode* m_stackingNode; | 195 DeprecatedPaintLayerStackingNode* m_stackingNode; |
223 bool m_previousMutationAllowedState; | 196 bool m_previousMutationAllowedState; |
224 }; | 197 }; |
225 #endif | 198 #endif |
226 | 199 |
227 } // namespace blink | 200 } // namespace blink |
228 | 201 |
229 #endif // DeprecatedPaintLayerStackingNode_h | 202 #endif // DeprecatedPaintLayerStackingNode_h |
OLD | NEW |