| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 bool hasHorizontalOverflow = this->hasHorizontalOverflow(); | 609 bool hasHorizontalOverflow = this->hasHorizontalOverflow(); |
| 610 bool hasVerticalOverflow = this->hasVerticalOverflow(); | 610 bool hasVerticalOverflow = this->hasVerticalOverflow(); |
| 611 if (hasOverlayScrollbars()) { | 611 if (hasOverlayScrollbars()) { |
| 612 if (!scrollSize(HorizontalScrollbar)) | 612 if (!scrollSize(HorizontalScrollbar)) |
| 613 setHasHorizontalScrollbar(false); | 613 setHasHorizontalScrollbar(false); |
| 614 if (!scrollSize(VerticalScrollbar)) | 614 if (!scrollSize(VerticalScrollbar)) |
| 615 setHasVerticalScrollbar(false); | 615 setHasVerticalScrollbar(false); |
| 616 } | 616 } |
| 617 | 617 |
| 618 // overflow:auto may need to lay out again if scrollbars got added/removed. | 618 // overflow:auto may need to lay out again if scrollbars got added/removed. |
| 619 autoHorizontalScrollBarChanged = (box().hasAutoHorizontalScrollbar() && (has
HorizontalScrollbar() != hasHorizontalOverflow)) || (box().style()->overflowX()
== OSCROLL && !horizontalScrollbar()); | 619 autoHorizontalScrollBarChanged |= (box().hasAutoHorizontalScrollbar() && (ha
sHorizontalScrollbar() != hasHorizontalOverflow)) || (box().style()->overflowX()
== OSCROLL && !horizontalScrollbar()); |
| 620 autoVerticalScrollBarChanged = (box().hasAutoVerticalScrollbar() && (hasVert
icalScrollbar() != hasVerticalOverflow)) || (box().style()->overflowY() == OSCRO
LL && !verticalScrollbar()); | 620 autoVerticalScrollBarChanged |= (box().hasAutoVerticalScrollbar() && (hasVer
ticalScrollbar() != hasVerticalOverflow)) || (box().style()->overflowY() == OSCR
OLL && !verticalScrollbar()); |
| 621 if (!visualViewportSuppliesScrollbars() && (autoHorizontalScrollBarChanged |
| autoVerticalScrollBarChanged)) { | 621 if (!visualViewportSuppliesScrollbars() && (autoHorizontalScrollBarChanged |
| autoVerticalScrollBarChanged)) { |
| 622 if (box().hasAutoHorizontalScrollbar()) | 622 if (box().hasAutoHorizontalScrollbar()) |
| 623 setHasHorizontalScrollbar(hasHorizontalOverflow); | 623 setHasHorizontalScrollbar(hasHorizontalOverflow); |
| 624 else if (box().style()->overflowX() == OSCROLL) | 624 else if (box().style()->overflowX() == OSCROLL) |
| 625 setHasHorizontalScrollbar(true); | 625 setHasHorizontalScrollbar(true); |
| 626 if (box().hasAutoVerticalScrollbar()) | 626 if (box().hasAutoVerticalScrollbar()) |
| 627 setHasVerticalScrollbar(hasVerticalOverflow); | 627 setHasVerticalScrollbar(hasVerticalOverflow); |
| 628 else if (box().style()->overflowY() == OSCROLL) | 628 else if (box().style()->overflowY() == OSCROLL) |
| 629 setHasVerticalScrollbar(true); | 629 setHasVerticalScrollbar(true); |
| 630 } | 630 } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 714 bool hasOverflow = hasScrollableHorizontalOverflow() || hasScrollableVertica
lOverflow(); | 714 bool hasOverflow = hasScrollableHorizontalOverflow() || hasScrollableVertica
lOverflow(); |
| 715 updateScrollableAreaSet(hasOverflow); | 715 updateScrollableAreaSet(hasOverflow); |
| 716 | 716 |
| 717 DisableCompositingQueryAsserts disabler; | 717 DisableCompositingQueryAsserts disabler; |
| 718 positionOverflowControls(); | 718 positionOverflowControls(); |
| 719 } | 719 } |
| 720 | 720 |
| 721 void PaintLayerScrollableArea::updateAfterLayout() | 721 void PaintLayerScrollableArea::updateAfterLayout() |
| 722 { | 722 { |
| 723 DoubleSize originalScrollOffset; | 723 DoubleSize originalScrollOffset; |
| 724 bool autoHorizontalScrollBarChanged; | 724 bool autoHorizontalScrollBarChanged = false; |
| 725 bool autoVerticalScrollBarChanged; | 725 bool autoVerticalScrollBarChanged = false; |
| 726 updateScrollDimensions(originalScrollOffset, autoHorizontalScrollBarChanged,
autoVerticalScrollBarChanged); | 726 updateScrollDimensions(originalScrollOffset, autoHorizontalScrollBarChanged,
autoVerticalScrollBarChanged); |
| 727 finalizeScrollDimensions(originalScrollOffset, autoHorizontalScrollBarChange
d, autoVerticalScrollBarChanged); | 727 finalizeScrollDimensions(originalScrollOffset, autoHorizontalScrollBarChange
d, autoVerticalScrollBarChanged); |
| 728 } | 728 } |
| 729 | 729 |
| 730 ScrollBehavior PaintLayerScrollableArea::scrollBehaviorStyle() const | 730 ScrollBehavior PaintLayerScrollableArea::scrollBehaviorStyle() const |
| 731 { | 731 { |
| 732 return box().style()->scrollBehavior(); | 732 return box().style()->scrollBehavior(); |
| 733 } | 733 } |
| 734 | 734 |
| 735 bool PaintLayerScrollableArea::hasHorizontalOverflow() const | 735 bool PaintLayerScrollableArea::hasHorizontalOverflow() const |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 } | 1526 } |
| 1527 | 1527 |
| 1528 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 1528 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) |
| 1529 { | 1529 { |
| 1530 visitor->trace(m_scrollableArea); | 1530 visitor->trace(m_scrollableArea); |
| 1531 visitor->trace(m_hBar); | 1531 visitor->trace(m_hBar); |
| 1532 visitor->trace(m_vBar); | 1532 visitor->trace(m_vBar); |
| 1533 } | 1533 } |
| 1534 | 1534 |
| 1535 } // namespace blink | 1535 } // namespace blink |
| OLD | NEW |