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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 ScrollBehavior scrollBehaviorStyle() const override; | 173 ScrollBehavior scrollBehaviorStyle() const override; |
174 | 174 |
175 double scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin(
).x(); } | 175 double scrollXOffset() const { return m_scrollOffset.width() + scrollOrigin(
).x(); } |
176 double scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin
().y(); } | 176 double scrollYOffset() const { return m_scrollOffset.height() + scrollOrigin
().y(); } |
177 | 177 |
178 DoubleSize scrollOffset() const { return m_scrollOffset; } | 178 DoubleSize scrollOffset() const { return m_scrollOffset; } |
179 | 179 |
180 // FIXME: We shouldn't allow access to m_overflowRect outside this class. | 180 // FIXME: We shouldn't allow access to m_overflowRect outside this class. |
181 LayoutRect overflowRect() const { return m_overflowRect; } | 181 LayoutRect overflowRect() const { return m_overflowRect; } |
182 | 182 |
183 void scrollToPosition(const DoublePoint& scrollPosition, ScrollOffsetClampin
g = ScrollOffsetUnclamped, ScrollBehavior = ScrollBehaviorInstant); | 183 void scrollToPosition(const DoublePoint& scrollPosition, ScrollOffsetClampin
g = ScrollOffsetUnclamped, ScrollBehavior = ScrollBehaviorInstant, ScrollType =
ProgrammaticScroll); |
184 | 184 |
185 void scrollToOffset(const DoubleSize& scrollOffset, ScrollOffsetClamping cla
mp = ScrollOffsetUnclamped, ScrollBehavior scrollBehavior = ScrollBehaviorInstan
t) | 185 void scrollToOffset(const DoubleSize& scrollOffset, ScrollOffsetClamping cla
mp = ScrollOffsetUnclamped, ScrollBehavior scrollBehavior = ScrollBehaviorInstan
t) |
186 { | 186 { |
187 scrollToPosition(-scrollOrigin() + scrollOffset, clamp, scrollBehavior); | 187 scrollToPosition(-scrollOrigin() + scrollOffset, clamp, scrollBehavior); |
188 } | 188 } |
189 | 189 |
190 void scrollToXOffset(double x, ScrollOffsetClamping clamp = ScrollOffsetUncl
amped, ScrollBehavior scrollBehavior = ScrollBehaviorInstant) | 190 void scrollToXOffset(double x, ScrollOffsetClamping clamp = ScrollOffsetUncl
amped, ScrollBehavior scrollBehavior = ScrollBehaviorInstant) |
191 { | 191 { |
192 scrollToOffset(DoubleSize(x, scrollYOffset()), clamp, scrollBehavior); | 192 scrollToOffset(DoubleSize(x, scrollYOffset()), clamp, scrollBehavior); |
193 } | 193 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 void positionOverflowControls(); | 239 void positionOverflowControls(); |
240 | 240 |
241 // isPointInResizeControl() is used for testing if a pointer/touch position
is in the resize control | 241 // isPointInResizeControl() is used for testing if a pointer/touch position
is in the resize control |
242 // area. | 242 // area. |
243 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp
e) const; | 243 bool isPointInResizeControl(const IntPoint& absolutePoint, ResizerHitTestTyp
e) const; |
244 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); | 244 bool hitTestOverflowControls(HitTestResult&, const IntPoint& localPoint); |
245 | 245 |
246 bool hitTestResizerInFragments(const PaintLayerFragments&, const HitTestLoca
tion&) const; | 246 bool hitTestResizerInFragments(const PaintLayerFragments&, const HitTestLoca
tion&) const; |
247 | 247 |
248 LayoutRect scrollIntoView(const LayoutRect&, const ScrollAlignment& alignX,
const ScrollAlignment& alignY) override; | 248 LayoutRect scrollIntoView(const LayoutRect&, const ScrollAlignment& alignX,
const ScrollAlignment& alignY, ScrollType = ProgrammaticScroll) override; |
249 | 249 |
250 // Returns true if scrollable area is in the FrameView's collection of scrol
lable areas. This can | 250 // Returns true if scrollable area is in the FrameView's collection of scrol
lable areas. This can |
251 // only happen if we're scrollable, visible to hit test, and do in fact over
flow. This means that | 251 // only happen if we're scrollable, visible to hit test, and do in fact over
flow. This means that |
252 // 'overflow: hidden' or 'pointer-events: none' layers never get added to th
e FrameView's collection. | 252 // 'overflow: hidden' or 'pointer-events: none' layers never get added to th
e FrameView's collection. |
253 bool scrollsOverflow() const { return m_scrollsOverflow; } | 253 bool scrollsOverflow() const { return m_scrollsOverflow; } |
254 | 254 |
255 // Rectangle encompassing the scroll corner and resizer rect. | 255 // Rectangle encompassing the scroll corner and resizer rect. |
256 IntRect scrollCornerAndResizerRect() const; | 256 IntRect scrollCornerAndResizerRect() const; |
257 | 257 |
258 enum LCDTextMode { | 258 enum LCDTextMode { |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 LayoutScrollbarPart* m_resizer; | 350 LayoutScrollbarPart* m_resizer; |
351 | 351 |
352 #if ENABLE(ASSERT) | 352 #if ENABLE(ASSERT) |
353 bool m_hasBeenDisposed; | 353 bool m_hasBeenDisposed; |
354 #endif | 354 #endif |
355 }; | 355 }; |
356 | 356 |
357 } // namespace blink | 357 } // namespace blink |
358 | 358 |
359 #endif // LayerScrollableArea_h | 359 #endif // LayerScrollableArea_h |
OLD | NEW |