| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ScrollPaintPropertyNode_h | 5 #ifndef ScrollPaintPropertyNode_h |
| 6 #define ScrollPaintPropertyNode_h | 6 #define ScrollPaintPropertyNode_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/geometry/FloatSize.h" | 9 #include "platform/geometry/FloatSize.h" |
| 10 #include "platform/graphics/paint/TransformPaintPropertyNode.h" | 10 #include "platform/graphics/paint/TransformPaintPropertyNode.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 const IntSize& clip, | 34 const IntSize& clip, |
| 35 const IntSize& bounds, | 35 const IntSize& bounds, |
| 36 bool userScrollableHorizontal, | 36 bool userScrollableHorizontal, |
| 37 bool userScrollableVertical) | 37 bool userScrollableVertical) |
| 38 { | 38 { |
| 39 return adoptRef(new ScrollPaintPropertyNode(std::move(parent), std::move
(scrollOffsetTranslation), clip, bounds, userScrollableHorizontal, userScrollabl
eVertical)); | 39 return adoptRef(new ScrollPaintPropertyNode(std::move(parent), std::move
(scrollOffsetTranslation), clip, bounds, userScrollableHorizontal, userScrollabl
eVertical)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void update(PassRefPtr<ScrollPaintPropertyNode> parent, PassRefPtr<const Tra
nsformPaintPropertyNode> scrollOffsetTranslation, const IntSize& clip, const Int
Size& bounds, bool userScrollableHorizontal, bool userScrollableVertical) | 42 void update(PassRefPtr<ScrollPaintPropertyNode> parent, PassRefPtr<const Tra
nsformPaintPropertyNode> scrollOffsetTranslation, const IntSize& clip, const Int
Size& bounds, bool userScrollableHorizontal, bool userScrollableVertical) |
| 43 { | 43 { |
| 44 DCHECK(!isRoot()); |
| 44 DCHECK(parent != this); | 45 DCHECK(parent != this); |
| 45 m_parent = parent; | 46 m_parent = parent; |
| 46 DCHECK(scrollOffsetTranslation->matrix().isIdentityOr2DTranslation()); | 47 DCHECK(scrollOffsetTranslation->matrix().isIdentityOr2DTranslation()); |
| 47 m_scrollOffsetTranslation = scrollOffsetTranslation; | 48 m_scrollOffsetTranslation = scrollOffsetTranslation; |
| 48 m_clip = clip; | 49 m_clip = clip; |
| 49 m_bounds = bounds; | 50 m_bounds = bounds; |
| 50 m_userScrollableHorizontal = userScrollableHorizontal; | 51 m_userScrollableHorizontal = userScrollableHorizontal; |
| 51 m_userScrollableVertical = userScrollableVertical; | 52 m_userScrollableVertical = userScrollableVertical; |
| 52 m_mainThreadScrollingReasons = 0; | 53 m_mainThreadScrollingReasons = 0; |
| 53 } | 54 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // TODO(pdr): Add a bit for whether this is affected by page scale. | 117 // TODO(pdr): Add a bit for whether this is affected by page scale. |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 // Redeclared here to avoid ODR issues. | 120 // Redeclared here to avoid ODR issues. |
| 120 // See platform/testing/PaintPrinters.h. | 121 // See platform/testing/PaintPrinters.h. |
| 121 void PrintTo(const ScrollPaintPropertyNode&, std::ostream*); | 122 void PrintTo(const ScrollPaintPropertyNode&, std::ostream*); |
| 122 | 123 |
| 123 } // namespace blink | 124 } // namespace blink |
| 124 | 125 |
| 125 #endif // ScrollPaintPropertyNode_h | 126 #endif // ScrollPaintPropertyNode_h |
| OLD | NEW |