| 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 ObjectPaintProperties_h | 5 #ifndef ObjectPaintProperties_h |
| 6 #define ObjectPaintProperties_h | 6 #define ObjectPaintProperties_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/geometry/LayoutPoint.h" | 9 #include "platform/geometry/LayoutPoint.h" |
| 10 #include "platform/graphics/paint/ClipPaintPropertyNode.h" | 10 #include "platform/graphics/paint/ClipPaintPropertyNode.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // baked into in the context here. However for properties that affects only
children, | 94 // baked into in the context here. However for properties that affects only
children, |
| 95 // for example, perspective and overflow clip, those should be applied by th
e painter | 95 // for example, perspective and overflow clip, those should be applied by th
e painter |
| 96 // at the right painting step. | 96 // at the right painting step. |
| 97 // TODO(pdr): Refactor this to use PropertyTreeState. | 97 // TODO(pdr): Refactor this to use PropertyTreeState. |
| 98 struct LocalBorderBoxProperties { | 98 struct LocalBorderBoxProperties { |
| 99 LayoutPoint paintOffset; | 99 LayoutPoint paintOffset; |
| 100 GeometryPropertyTreeState geometryPropertyTreeState; | 100 GeometryPropertyTreeState geometryPropertyTreeState; |
| 101 const ScrollPaintPropertyNode* scroll; | 101 const ScrollPaintPropertyNode* scroll; |
| 102 }; | 102 }; |
| 103 const LocalBorderBoxProperties* localBorderBoxProperties() const { return m_
localBorderBoxProperties.get(); } | 103 const LocalBorderBoxProperties* localBorderBoxProperties() const { return m_
localBorderBoxProperties.get(); } |
| 104 // ContentsProperties is the GeometryPropertyTreeState that is the same as i
n | 104 // ContentsPropertyTreeState is the GeometryPropertyTreeState that is the sa
me as in |
| 105 // localBorderBoxProperties, except that it is inside any clips and scrolls
caused by this | 105 // localBorderBoxProperties, except that it is inside any clips and scrolls
caused by this |
| 106 // object. This GeometryPropertyTreeState is suitable as the destination for
paint invalidation. | 106 // object. This GeometryPropertyTreeState is suitable as the destination for
paint invalidation. |
| 107 void getContentsProperties(GeometryPropertyTreeState&) const; | 107 // |paintOffsetFromState| is the offset from the GeometryPropertyTreeState t
o this object's |
| 108 // contents space. |
| 109 void getContentsPropertyTreeState(GeometryPropertyTreeState&, LayoutPoint& p
aintOffsetFromState) const; |
| 108 | 110 |
| 109 void clearPaintOffsetTranslation() { m_paintOffsetTranslation = nullptr; } | 111 void clearPaintOffsetTranslation() { m_paintOffsetTranslation = nullptr; } |
| 110 void clearTransform() { m_transform = nullptr; } | 112 void clearTransform() { m_transform = nullptr; } |
| 111 void clearEffect() { m_effect = nullptr; } | 113 void clearEffect() { m_effect = nullptr; } |
| 112 void clearCssClip() { m_cssClip = nullptr; } | 114 void clearCssClip() { m_cssClip = nullptr; } |
| 113 void clearCssClipFixedPosition() { m_cssClipFixedPosition = nullptr; } | 115 void clearCssClipFixedPosition() { m_cssClipFixedPosition = nullptr; } |
| 114 void clearOverflowClip() { m_overflowClip = nullptr; } | 116 void clearOverflowClip() { m_overflowClip = nullptr; } |
| 115 void clearPerspective() { m_perspective = nullptr; } | 117 void clearPerspective() { m_perspective = nullptr; } |
| 116 void clearSvgLocalToBorderBoxTransform() { m_svgLocalToBorderBoxTransform =
nullptr; } | 118 void clearSvgLocalToBorderBoxTransform() { m_svgLocalToBorderBoxTransform =
nullptr; } |
| 117 void clearScrollTranslation() { m_scrollTranslation = nullptr; } | 119 void clearScrollTranslation() { m_scrollTranslation = nullptr; } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; | 167 RefPtr<TransformPaintPropertyNode> m_scrollTranslation; |
| 166 RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset; | 168 RefPtr<TransformPaintPropertyNode> m_scrollbarPaintOffset; |
| 167 RefPtr<ScrollPaintPropertyNode> m_scroll; | 169 RefPtr<ScrollPaintPropertyNode> m_scroll; |
| 168 | 170 |
| 169 std::unique_ptr<LocalBorderBoxProperties> m_localBorderBoxProperties; | 171 std::unique_ptr<LocalBorderBoxProperties> m_localBorderBoxProperties; |
| 170 }; | 172 }; |
| 171 | 173 |
| 172 } // namespace blink | 174 } // namespace blink |
| 173 | 175 |
| 174 #endif // ObjectPaintProperties_h | 176 #endif // ObjectPaintProperties_h |
| OLD | NEW |