OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 protected: | 67 protected: |
68 ViewportConstraints() | 68 ViewportConstraints() |
69 : m_anchorEdges(0) | 69 : m_anchorEdges(0) |
70 { } | 70 { } |
71 | 71 |
72 FloatSize m_alignmentOffset; | 72 FloatSize m_alignmentOffset; |
73 AnchorEdges m_anchorEdges; | 73 AnchorEdges m_anchorEdges; |
74 }; | 74 }; |
75 | 75 |
76 class FixedPositionViewportConstraints : public ViewportConstraints { | 76 class FixedPositionViewportConstraints FINAL : public ViewportConstraints { |
77 public: | 77 public: |
78 FixedPositionViewportConstraints() | 78 FixedPositionViewportConstraints() |
79 : ViewportConstraints() | 79 : ViewportConstraints() |
80 { } | 80 { } |
81 | 81 |
82 FixedPositionViewportConstraints(const FixedPositionViewportConstraints& oth
er) | 82 FixedPositionViewportConstraints(const FixedPositionViewportConstraints& oth
er) |
83 : ViewportConstraints(other) | 83 : ViewportConstraints(other) |
84 , m_viewportRectAtLastLayout(other.m_viewportRectAtLastLayout) | 84 , m_viewportRectAtLastLayout(other.m_viewportRectAtLastLayout) |
85 , m_layerPositionAtLastLayout(other.m_layerPositionAtLastLayout) | 85 , m_layerPositionAtLastLayout(other.m_layerPositionAtLastLayout) |
86 { } | 86 { } |
(...skipping 10 matching lines...) Expand all Loading... |
97 { | 97 { |
98 return m_alignmentOffset == other.m_alignmentOffset | 98 return m_alignmentOffset == other.m_alignmentOffset |
99 && m_anchorEdges == other.m_anchorEdges | 99 && m_anchorEdges == other.m_anchorEdges |
100 && m_viewportRectAtLastLayout == other.m_viewportRectAtLastLayout | 100 && m_viewportRectAtLastLayout == other.m_viewportRectAtLastLayout |
101 && m_layerPositionAtLastLayout == other.m_layerPositionAtLastLayout; | 101 && m_layerPositionAtLastLayout == other.m_layerPositionAtLastLayout; |
102 } | 102 } |
103 | 103 |
104 bool operator!=(const FixedPositionViewportConstraints& other) const { retur
n !(*this == other); } | 104 bool operator!=(const FixedPositionViewportConstraints& other) const { retur
n !(*this == other); } |
105 | 105 |
106 private: | 106 private: |
107 virtual ConstraintType constraintType() const OVERRIDE { return FixedPositio
nConstaint; }; | 107 virtual ConstraintType constraintType() const OVERRIDE { return FixedPositio
nConstaint; } |
108 | 108 |
109 FloatRect m_viewportRectAtLastLayout; | 109 FloatRect m_viewportRectAtLastLayout; |
110 FloatPoint m_layerPositionAtLastLayout; | 110 FloatPoint m_layerPositionAtLastLayout; |
111 }; | 111 }; |
112 | 112 |
113 class StickyPositionViewportConstraints : public ViewportConstraints { | 113 class StickyPositionViewportConstraints FINAL : public ViewportConstraints { |
114 public: | 114 public: |
115 StickyPositionViewportConstraints() | 115 StickyPositionViewportConstraints() |
116 : m_leftOffset(0) | 116 : m_leftOffset(0) |
117 , m_rightOffset(0) | 117 , m_rightOffset(0) |
118 , m_topOffset(0) | 118 , m_topOffset(0) |
119 , m_bottomOffset(0) | 119 , m_bottomOffset(0) |
120 { } | 120 { } |
121 | 121 |
122 StickyPositionViewportConstraints(const StickyPositionViewportConstraints& o
ther) | 122 StickyPositionViewportConstraints(const StickyPositionViewportConstraints& o
ther) |
123 : ViewportConstraints(other) | 123 : ViewportConstraints(other) |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 && m_bottomOffset == other.m_bottomOffset | 165 && m_bottomOffset == other.m_bottomOffset |
166 && m_absoluteContainingBlockRect == other.m_absoluteContainingBlockR
ect | 166 && m_absoluteContainingBlockRect == other.m_absoluteContainingBlockR
ect |
167 && m_absoluteStickyBoxRect == other.m_absoluteStickyBoxRect | 167 && m_absoluteStickyBoxRect == other.m_absoluteStickyBoxRect |
168 && m_stickyOffsetAtLastLayout == other.m_stickyOffsetAtLastLayout | 168 && m_stickyOffsetAtLastLayout == other.m_stickyOffsetAtLastLayout |
169 && m_layerPositionAtLastLayout == other.m_layerPositionAtLastLayout; | 169 && m_layerPositionAtLastLayout == other.m_layerPositionAtLastLayout; |
170 } | 170 } |
171 | 171 |
172 bool operator!=(const StickyPositionViewportConstraints& other) const { retu
rn !(*this == other); } | 172 bool operator!=(const StickyPositionViewportConstraints& other) const { retu
rn !(*this == other); } |
173 | 173 |
174 private: | 174 private: |
175 virtual ConstraintType constraintType() const OVERRIDE { return StickyPositi
onConstraint; }; | 175 virtual ConstraintType constraintType() const OVERRIDE { return StickyPositi
onConstraint; } |
176 | 176 |
177 float m_leftOffset; | 177 float m_leftOffset; |
178 float m_rightOffset; | 178 float m_rightOffset; |
179 float m_topOffset; | 179 float m_topOffset; |
180 float m_bottomOffset; | 180 float m_bottomOffset; |
181 FloatRect m_absoluteContainingBlockRect; | 181 FloatRect m_absoluteContainingBlockRect; |
182 FloatRect m_absoluteStickyBoxRect; | 182 FloatRect m_absoluteStickyBoxRect; |
183 FloatSize m_stickyOffsetAtLastLayout; | 183 FloatSize m_stickyOffsetAtLastLayout; |
184 FloatPoint m_layerPositionAtLastLayout; | 184 FloatPoint m_layerPositionAtLastLayout; |
185 }; | 185 }; |
186 | 186 |
187 } // namespace WebCore | 187 } // namespace WebCore |
188 | 188 |
189 #endif // ScrollingConstraints_h | 189 #endif // ScrollingConstraints_h |
OLD | NEW |