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