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 |
| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 static void updateScrollAndScrollTranslation( | 141 static void updateScrollAndScrollTranslation( |
137 const LayoutObject&, | 142 const LayoutObject&, |
138 PaintPropertyTreeBuilderContext&); | 143 PaintPropertyTreeBuilderContext&); |
139 static void updateOutOfFlowContext(const LayoutObject&, | 144 static void updateOutOfFlowContext(const LayoutObject&, |
140 PaintPropertyTreeBuilderContext&); | 145 PaintPropertyTreeBuilderContext&); |
141 }; | 146 }; |
142 | 147 |
143 } // namespace blink | 148 } // namespace blink |
144 | 149 |
145 #endif // PaintPropertyTreeBuilder_h | 150 #endif // PaintPropertyTreeBuilder_h |
OLD | NEW |