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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 // post-update work even if the scroll position didn't change. | 332 // post-update work even if the scroll position didn't change. |
333 void setScrollPositionUnconditionally(const DoublePoint&, | 333 void setScrollPositionUnconditionally(const DoublePoint&, |
334 ScrollType = ProgrammaticScroll); | 334 ScrollType = ProgrammaticScroll); |
335 | 335 |
336 // TODO(szager): Actually run these after all of layout is finished. | 336 // TODO(szager): Actually run these after all of layout is finished. |
337 // Currently, they run at the end of box()'es layout (or after all flexbox | 337 // Currently, they run at the end of box()'es layout (or after all flexbox |
338 // layout has finished) but while document layout is still happening. | 338 // layout has finished) but while document layout is still happening. |
339 void updateAfterLayout(); | 339 void updateAfterLayout(); |
340 void clampScrollOffsetsAfterLayout(); | 340 void clampScrollOffsetsAfterLayout(); |
341 | 341 |
| 342 void didChangeScrollbarsHidden() override; |
| 343 |
342 void updateAfterStyleChange(const ComputedStyle*); | 344 void updateAfterStyleChange(const ComputedStyle*); |
343 void updateAfterOverflowRecalc(); | 345 void updateAfterOverflowRecalc(); |
344 | 346 |
345 bool updateAfterCompositingChange() override; | 347 bool updateAfterCompositingChange() override; |
346 | 348 |
347 bool hasScrollbar() const { | 349 bool hasScrollbar() const { |
348 return hasHorizontalScrollbar() || hasVerticalScrollbar(); | 350 return hasHorizontalScrollbar() || hasVerticalScrollbar(); |
349 } | 351 } |
350 bool hasOverflowControls() const { | 352 bool hasOverflowControls() const { |
351 return hasScrollbar() || scrollCorner() || resizer(); | 353 return hasScrollbar() || scrollCorner() || resizer(); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 void invalidateStickyConstraintsFor(PaintLayer*, | 488 void invalidateStickyConstraintsFor(PaintLayer*, |
487 bool needsCompositingUpdate = true); | 489 bool needsCompositingUpdate = true); |
488 | 490 |
489 uint64_t id() const; | 491 uint64_t id() const; |
490 | 492 |
491 DECLARE_VIRTUAL_TRACE(); | 493 DECLARE_VIRTUAL_TRACE(); |
492 | 494 |
493 private: | 495 private: |
494 explicit PaintLayerScrollableArea(PaintLayer&); | 496 explicit PaintLayerScrollableArea(PaintLayer&); |
495 | 497 |
| 498 void updateScrollbarsEnabledState(); |
| 499 |
496 bool hasHorizontalOverflow() const; | 500 bool hasHorizontalOverflow() const; |
497 bool hasVerticalOverflow() const; | 501 bool hasVerticalOverflow() const; |
498 bool hasScrollableHorizontalOverflow() const; | 502 bool hasScrollableHorizontalOverflow() const; |
499 bool hasScrollableVerticalOverflow() const; | 503 bool hasScrollableVerticalOverflow() const; |
500 bool visualViewportSuppliesScrollbars() const; | 504 bool visualViewportSuppliesScrollbars() const; |
501 | 505 |
502 bool needsScrollbarReconstruction() const; | 506 bool needsScrollbarReconstruction() const; |
503 | 507 |
504 void updateScrollOrigin(); | 508 void updateScrollOrigin(); |
505 void updateScrollDimensions(); | 509 void updateScrollDimensions(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 | 599 |
596 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, | 600 DEFINE_TYPE_CASTS(PaintLayerScrollableArea, |
597 ScrollableArea, | 601 ScrollableArea, |
598 scrollableArea, | 602 scrollableArea, |
599 scrollableArea->isPaintLayerScrollableArea(), | 603 scrollableArea->isPaintLayerScrollableArea(), |
600 scrollableArea.isPaintLayerScrollableArea()); | 604 scrollableArea.isPaintLayerScrollableArea()); |
601 | 605 |
602 } // namespace blink | 606 } // namespace blink |
603 | 607 |
604 #endif // LayerScrollableArea_h | 608 #endif // LayerScrollableArea_h |
OLD | NEW |