| 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 StickyPositionScrollingConstraints_h | 5 #ifndef StickyPositionScrollingConstraints_h |
| 6 #define StickyPositionScrollingConstraints_h | 6 #define StickyPositionScrollingConstraints_h |
| 7 | 7 |
| 8 #include "platform/geometry/FloatRect.h" | 8 #include "platform/geometry/FloatRect.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| 11 | 11 |
| 12 class LayoutBoxModelObjectTest; |
| 13 |
| 12 class StickyPositionScrollingConstraints final { | 14 class StickyPositionScrollingConstraints final { |
| 13 public: | 15 public: |
| 14 enum AnchorEdgeFlags { | 16 enum AnchorEdgeFlags { |
| 15 AnchorEdgeLeft = 1 << 0, | 17 AnchorEdgeLeft = 1 << 0, |
| 16 AnchorEdgeRight = 1 << 1, | 18 AnchorEdgeRight = 1 << 1, |
| 17 AnchorEdgeTop = 1 << 2, | 19 AnchorEdgeTop = 1 << 2, |
| 18 AnchorEdgeBottom = 1 << 3 | 20 AnchorEdgeBottom = 1 << 3 |
| 19 }; | 21 }; |
| 20 typedef unsigned AnchorEdges; | 22 typedef unsigned AnchorEdges; |
| 21 | 23 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 && m_rightOffset == other.m_rightOffset | 66 && m_rightOffset == other.m_rightOffset |
| 65 && m_topOffset == other.m_topOffset | 67 && m_topOffset == other.m_topOffset |
| 66 && m_bottomOffset == other.m_bottomOffset | 68 && m_bottomOffset == other.m_bottomOffset |
| 67 && m_scrollContainerRelativeContainingBlockRect == other.m_scrollCon
tainerRelativeContainingBlockRect | 69 && m_scrollContainerRelativeContainingBlockRect == other.m_scrollCon
tainerRelativeContainingBlockRect |
| 68 && m_scrollContainerRelativeStickyBoxRect == other.m_scrollContainer
RelativeStickyBoxRect; | 70 && m_scrollContainerRelativeStickyBoxRect == other.m_scrollContainer
RelativeStickyBoxRect; |
| 69 } | 71 } |
| 70 | 72 |
| 71 bool operator!=(const StickyPositionScrollingConstraints& other) const { ret
urn !(*this == other); } | 73 bool operator!=(const StickyPositionScrollingConstraints& other) const { ret
urn !(*this == other); } |
| 72 | 74 |
| 73 private: | 75 private: |
| 76 friend class LayoutBoxModelObjectTest; |
| 77 |
| 78 const FloatRect& scrollContainerRelativeContainingBlockRect() const { return
m_scrollContainerRelativeContainingBlockRect; } |
| 79 const FloatRect& scrollContainerRelativeStickyBoxRect() const { return m_scr
ollContainerRelativeStickyBoxRect; } |
| 80 |
| 74 AnchorEdges m_anchorEdges; | 81 AnchorEdges m_anchorEdges; |
| 75 float m_leftOffset; | 82 float m_leftOffset; |
| 76 float m_rightOffset; | 83 float m_rightOffset; |
| 77 float m_topOffset; | 84 float m_topOffset; |
| 78 float m_bottomOffset; | 85 float m_bottomOffset; |
| 79 FloatRect m_scrollContainerRelativeContainingBlockRect; | 86 FloatRect m_scrollContainerRelativeContainingBlockRect; |
| 80 FloatRect m_scrollContainerRelativeStickyBoxRect; | 87 FloatRect m_scrollContainerRelativeStickyBoxRect; |
| 81 }; | 88 }; |
| 82 | 89 |
| 83 } // namespace blink | 90 } // namespace blink |
| 84 | 91 |
| 85 #endif // StickyPositionScrollingConstraints_h | 92 #endif // StickyPositionScrollingConstraints_h |
| OLD | NEW |