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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 void scrollbarVisibilityChanged() override; | 288 void scrollbarVisibilityChanged() override; |
289 IntRect scrollableAreaBoundingBox() const override; | 289 IntRect scrollableAreaBoundingBox() const override; |
290 void registerForAnimation() override; | 290 void registerForAnimation() override; |
291 void deregisterForAnimation() override; | 291 void deregisterForAnimation() override; |
292 bool userInputScrollable(ScrollbarOrientation) const override; | 292 bool userInputScrollable(ScrollbarOrientation) const override; |
293 bool shouldPlaceVerticalScrollbarOnLeft() const override; | 293 bool shouldPlaceVerticalScrollbarOnLeft() const override; |
294 int pageStep(ScrollbarOrientation) const override; | 294 int pageStep(ScrollbarOrientation) const override; |
295 ScrollBehavior scrollBehaviorStyle() const override; | 295 ScrollBehavior scrollBehaviorStyle() const override; |
296 CompositorAnimationTimeline* compositorAnimationTimeline() const override; | 296 CompositorAnimationTimeline* compositorAnimationTimeline() const override; |
297 | 297 |
| 298 void visibleSizeChanged(); |
| 299 |
298 // FIXME: We shouldn't allow access to m_overflowRect outside this class. | 300 // FIXME: We shouldn't allow access to m_overflowRect outside this class. |
299 LayoutRect overflowRect() const { return m_overflowRect; } | 301 LayoutRect overflowRect() const { return m_overflowRect; } |
300 | 302 |
301 void scrollToAbsolutePosition( | 303 void scrollToAbsolutePosition( |
302 const FloatPoint& position, | 304 const FloatPoint& position, |
303 ScrollBehavior scrollBehavior = ScrollBehaviorInstant, | 305 ScrollBehavior scrollBehavior = ScrollBehaviorInstant, |
304 ScrollType scrollType = ProgrammaticScroll) { | 306 ScrollType scrollType = ProgrammaticScroll) { |
305 setScrollOffset(position - scrollOrigin(), scrollType, scrollBehavior); | 307 setScrollOffset(position - scrollOrigin(), scrollType, scrollBehavior); |
306 } | 308 } |
307 | 309 |
308 // This will set the scroll position without clamping, and it will do all | 310 // This will set the scroll position without clamping, and it will do all |
309 // post-update work even if the scroll position didn't change. | 311 // post-update work even if the scroll position didn't change. |
310 void setScrollOffsetUnconditionally(const ScrollOffset&, | 312 void setScrollOffsetUnconditionally(const ScrollOffset&, |
311 ScrollType = ProgrammaticScroll); | 313 ScrollType = ProgrammaticScroll); |
312 | 314 |
313 // This will set the scroll position without clamping, and it will do all | 315 // This will set the scroll position without clamping, and it will do all |
314 // post-update work even if the scroll position didn't change. | 316 // post-update work even if the scroll position didn't change. |
315 void setScrollPositionUnconditionally(const DoublePoint&, | 317 void setScrollPositionUnconditionally(const DoublePoint&, |
316 ScrollType = ProgrammaticScroll); | 318 ScrollType = ProgrammaticScroll); |
317 | 319 |
318 // TODO(szager): Actually run these after all of layout is finished. | 320 // TODO(szager): Actually run these after all of layout is finished. |
319 // Currently, they run at the end of box()'es layout (or after all flexbox | 321 // Currently, they run at the end of box()'es layout (or after all flexbox |
320 // layout has finished) but while document layout is still happening. | 322 // layout has finished) but while document layout is still happening. |
321 void updateAfterLayout(); | 323 void updateAfterLayout(); |
322 void clampScrollOffsetsAfterLayout(); | 324 void clampScrollOffsetsAfterLayout(); |
323 | 325 |
324 void didChangeScrollbarsHidden() override; | |
325 | |
326 void updateAfterStyleChange(const ComputedStyle*); | 326 void updateAfterStyleChange(const ComputedStyle*); |
327 void updateAfterOverflowRecalc(); | 327 void updateAfterOverflowRecalc(); |
328 | 328 |
329 bool updateAfterCompositingChange() override; | 329 bool updateAfterCompositingChange() override; |
330 | 330 |
331 bool hasScrollbar() const { | 331 bool hasScrollbar() const { |
332 return hasHorizontalScrollbar() || hasVerticalScrollbar(); | 332 return hasHorizontalScrollbar() || hasVerticalScrollbar(); |
333 } | 333 } |
334 bool hasOverflowControls() const { | 334 bool hasOverflowControls() const { |
335 return hasScrollbar() || scrollCorner() || resizer(); | 335 return hasScrollbar() || scrollCorner() || resizer(); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 | 581 |
582 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, | 582 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, |
583 ScrollableArea, | 583 ScrollableArea, |
584 scrollableArea, | 584 scrollableArea, |
585 scrollableArea->isPaintLayerScrollableArea(), | 585 scrollableArea->isPaintLayerScrollableArea(), |
586 scrollableArea.isPaintLayerScrollableArea()); | 586 scrollableArea.isPaintLayerScrollableArea()); |
587 | 587 |
588 } // namespace blink | 588 } // namespace blink |
589 | 589 |
590 #endif // LayerScrollableArea_h | 590 #endif // LayerScrollableArea_h |
OLD | NEW |