OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2009, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 ScrollBehavior scrollBehaviorStyle() const override; | 124 ScrollBehavior scrollBehaviorStyle() const override; |
125 | 125 |
126 double scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin(
).x(); } | 126 double scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin(
).x(); } |
127 double scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin
().y(); } | 127 double scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin
().y(); } |
128 | 128 |
129 DoubleSize scrollOffset() const { return m_scrollOffset; } | 129 DoubleSize scrollOffset() const { return m_scrollOffset; } |
130 | 130 |
131 // FIXME: We shouldn't allow access to m_overflowRect outside this class. | 131 // FIXME: We shouldn't allow access to m_overflowRect outside this class. |
132 LayoutRect overflowRect() const { return m_overflowRect; } | 132 LayoutRect overflowRect() const { return m_overflowRect; } |
133 | 133 |
134 void scrollToPosition(const DoublePoint& scrollPosition, ScrollOffsetClampin
g = ScrollOffsetUnclamped, ScrollBehavior = ScrollBehaviorInstant); | 134 void scrollToPosition(const DoublePoint& scrollPosition, ScrollOffsetClampin
g = ScrollOffsetUnclamped, ScrollBehavior = ScrollBehaviorInstant, ScrollType =
ProgrammaticScroll); |
135 | 135 |
136 void scrollToOffset(const DoubleSize& scrollOffset, ScrollOffsetClamping cla
mp = ScrollOffsetUnclamped, ScrollBehavior scrollBehavior = ScrollBehaviorInstan
t) | 136 void scrollToOffset(const DoubleSize& scrollOffset, ScrollOffsetClamping cla
mp = ScrollOffsetUnclamped, ScrollBehavior scrollBehavior = ScrollBehaviorInstan
t) |
137 { | 137 { |
138 scrollToPosition(-scrollOrigin() + scrollOffset, clamp, scrollBehavior); | 138 scrollToPosition(-scrollOrigin() + scrollOffset, clamp, scrollBehavior); |
139 } | 139 } |
140 | 140 |
141 void scrollToXOffset(double x, ScrollOffsetClamping clamp = ScrollOffsetUncl
amped, ScrollBehavior scrollBehavior = ScrollBehaviorInstant) | 141 void scrollToXOffset(double x, ScrollOffsetClamping clamp = ScrollOffsetUncl
amped, ScrollBehavior scrollBehavior = ScrollBehaviorInstant) |
142 { | 142 { |
143 scrollToOffset(DoubleSize(x, scrollYOffset()), clamp, scrollBehavior); | 143 scrollToOffset(DoubleSize(x, scrollYOffset()), clamp, scrollBehavior); |
144 } | 144 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 | 189 |
190 void positionOverflowControls(); | 190 void positionOverflowControls(); |
191 | 191 |
192 // isPointInResizeControl() is used for testing if a pointer/touch position
is in the resize control | 192 // isPointInResizeControl() is used for testing if a pointer/touch position
is in the resize control |
193 // area. | 193 // area. |
194 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp
e) const; | 194 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp
e) const; |
195 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); | 195 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); |
196 | 196 |
197 bool hitTestResizerInFragments(const DeprecatedPaintLayerFragments&, const H
itTestLocation&) const; | 197 bool hitTestResizerInFragments(const DeprecatedPaintLayerFragments&, const H
itTestLocation&) const; |
198 | 198 |
199 LayoutRect scrollIntoView(const LayoutRect&, const ScrollAlignment& alignX,
const ScrollAlignment& alignY) override; | 199 LayoutRect scrollIntoView(const LayoutRect&, const ScrollAlignment& alignX,
const ScrollAlignment& alignY, ScrollType = ProgrammaticScroll) override; |
200 | 200 |
201 // Returns true if scrollable area is in the FrameView's collection of scrol
lable areas. This can | 201 // Returns true if scrollable area is in the FrameView's collection of scrol
lable areas. This can |
202 // only happen if we're scrollable, visible to hit test, and do in fact over
flow. This means that | 202 // only happen if we're scrollable, visible to hit test, and do in fact over
flow. This means that |
203 // 'overflow: hidden' or 'pointer-events: none' layers never get added to th
e FrameView's collection. | 203 // 'overflow: hidden' or 'pointer-events: none' layers never get added to th
e FrameView's collection. |
204 bool scrollsOverflow() const { return m_scrollsOverflow; } | 204 bool scrollsOverflow() const { return m_scrollsOverflow; } |
205 | 205 |
206 // Rectangle encompassing the scroll corner and resizer rect. | 206 // Rectangle encompassing the scroll corner and resizer rect. |
207 IntRect scrollCornerAndResizerRect() const; | 207 IntRect scrollCornerAndResizerRect() const; |
208 | 208 |
209 enum LCDTextMode { | 209 enum LCDTextMode { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 LayoutScrollbarPart* m_resizer; | 305 LayoutScrollbarPart* m_resizer; |
306 | 306 |
307 #if ENABLE(ASSERT) | 307 #if ENABLE(ASSERT) |
308 bool m_hasBeenDisposed; | 308 bool m_hasBeenDisposed; |
309 #endif | 309 #endif |
310 }; | 310 }; |
311 | 311 |
312 } // namespace blink | 312 } // namespace blink |
313 | 313 |
314 #endif // LayerScrollableArea_h | 314 #endif // LayerScrollableArea_h |
OLD | NEW |