OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 PaintPropertyTreeBuilder_h | 5 #ifndef PaintPropertyTreeBuilder_h |
6 #define PaintPropertyTreeBuilder_h | 6 #define PaintPropertyTreeBuilder_h |
7 | 7 |
8 #include "platform/geometry/LayoutPoint.h" | 8 #include "platform/geometry/LayoutPoint.h" |
9 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 9 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
10 #include "platform/graphics/paint/EffectPaintPropertyNode.h" | 10 #include "platform/graphics/paint/EffectPaintPropertyNode.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 // These additional contexts normally pass through untouched, and are only | 58 // These additional contexts normally pass through untouched, and are only |
59 // copied from the main context when the current element serves as the | 59 // copied from the main context when the current element serves as the |
60 // containing block of corresponding positioned descendants. Overflow clips | 60 // containing block of corresponding positioned descendants. Overflow clips |
61 // are also inherited by containing block tree instead of DOM tree, thus they | 61 // are also inherited by containing block tree instead of DOM tree, thus they |
62 // are included in the additional context too. | 62 // are included in the additional context too. |
63 ContainingBlockContext absolutePosition; | 63 ContainingBlockContext absolutePosition; |
64 const LayoutObject* containerForAbsolutePosition = nullptr; | 64 const LayoutObject* containerForAbsolutePosition = nullptr; |
65 | 65 |
66 ContainingBlockContext fixedPosition; | 66 ContainingBlockContext fixedPosition; |
67 | 67 |
68 // This is the same as current.paintOffset except when a floating object has | |
chrishtr
2016/12/16 22:10:30
Nit: add a comma after paintOffset
| |
69 // non-block ancestors under its containing block. Paint offsets of the | |
70 // non-block ancestors should not be accumulated for the floating object. | |
71 LayoutPoint paintOffsetForFloat; | |
72 | |
68 // The effect hierarchy is applied by the stacking context tree. It is | 73 // The effect hierarchy is applied by the stacking context tree. It is |
69 // guaranteed that every DOM descendant is also a stacking context descendant. | 74 // guaranteed that every DOM descendant is also a stacking context descendant. |
70 // Therefore, we don't need extra bookkeeping for effect nodes and can | 75 // Therefore, we don't need extra bookkeeping for effect nodes and can |
71 // generate the effect tree from a DOM-order traversal. | 76 // generate the effect tree from a DOM-order traversal. |
72 const EffectPaintPropertyNode* currentEffect = nullptr; | 77 const EffectPaintPropertyNode* currentEffect = nullptr; |
73 // Some effects are spatial, i.e. may refer to input pixels outside of output | 78 // Some effects are spatial, i.e. may refer to input pixels outside of output |
74 // clip. The cull rect for its input shall be derived from its output clip. | 79 // clip. The cull rect for its input shall be derived from its output clip. |
75 // This variable represents the input cull of current effect, also serves as | 80 // This variable represents the input cull of current effect, also serves as |
76 // output clip of child effects that don't have a hard clip. | 81 // output clip of child effects that don't have a hard clip. |
77 const ClipPaintPropertyNode* inputClipOfCurrentEffect = nullptr; | 82 const ClipPaintPropertyNode* inputClipOfCurrentEffect = nullptr; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 static void updateOverflowClip(const LayoutObject&, | 133 static void updateOverflowClip(const LayoutObject&, |
129 PaintPropertyTreeBuilderContext&); | 134 PaintPropertyTreeBuilderContext&); |
130 static void updatePerspective(const LayoutObject&, | 135 static void updatePerspective(const LayoutObject&, |
131 PaintPropertyTreeBuilderContext&); | 136 PaintPropertyTreeBuilderContext&); |
132 static void updateSvgLocalToBorderBoxTransform( | 137 static void updateSvgLocalToBorderBoxTransform( |
133 const LayoutObject&, | 138 const LayoutObject&, |
134 PaintPropertyTreeBuilderContext&); | 139 PaintPropertyTreeBuilderContext&); |
135 static void updateScrollAndScrollTranslation( | 140 static void updateScrollAndScrollTranslation( |
136 const LayoutObject&, | 141 const LayoutObject&, |
137 PaintPropertyTreeBuilderContext&); | 142 PaintPropertyTreeBuilderContext&); |
138 static void updateOutOfFlowContext(const LayoutObject&, | 143 static void updateOutOfFlowAndFloatContext(const LayoutObject&, |
139 PaintPropertyTreeBuilderContext&); | 144 PaintPropertyTreeBuilderContext&); |
140 }; | 145 }; |
141 | 146 |
142 } // namespace blink | 147 } // namespace blink |
143 | 148 |
144 #endif // PaintPropertyTreeBuilder_h | 149 #endif // PaintPropertyTreeBuilder_h |
OLD | NEW |