| 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 bool hasHorizontalOverflow = this->hasHorizontalOverflow(); | 660 bool hasHorizontalOverflow = this->hasHorizontalOverflow(); |
| 661 bool hasVerticalOverflow = this->hasVerticalOverflow(); | 661 bool hasVerticalOverflow = this->hasVerticalOverflow(); |
| 662 if (hasOverlayScrollbars()) { | 662 if (hasOverlayScrollbars()) { |
| 663 if (!scrollSize(HorizontalScrollbar)) | 663 if (!scrollSize(HorizontalScrollbar)) |
| 664 setHasHorizontalScrollbar(false); | 664 setHasHorizontalScrollbar(false); |
| 665 if (!scrollSize(VerticalScrollbar)) | 665 if (!scrollSize(VerticalScrollbar)) |
| 666 setHasVerticalScrollbar(false); | 666 setHasVerticalScrollbar(false); |
| 667 } | 667 } |
| 668 | 668 |
| 669 // overflow:auto may need to lay out again if scrollbars got added/removed. | 669 // overflow:auto may need to lay out again if scrollbars got added/removed. |
| 670 autoHorizontalScrollBarChanged = (box().hasAutoHorizontalScrollbar() && (has
HorizontalScrollbar() != hasHorizontalOverflow)) || (box().style()->overflowX()
== OSCROLL && !horizontalScrollbar()); | 670 autoHorizontalScrollBarChanged |= (box().hasAutoHorizontalScrollbar() && (ha
sHorizontalScrollbar() != hasHorizontalOverflow)) || (box().style()->overflowX()
== OSCROLL && !horizontalScrollbar()); |
| 671 autoVerticalScrollBarChanged = (box().hasAutoVerticalScrollbar() && (hasVert
icalScrollbar() != hasVerticalOverflow)) || (box().style()->overflowY() == OSCRO
LL && !verticalScrollbar()); | 671 autoVerticalScrollBarChanged |= (box().hasAutoVerticalScrollbar() && (hasVer
ticalScrollbar() != hasVerticalOverflow)) || (box().style()->overflowY() == OSCR
OLL && !verticalScrollbar()); |
| 672 if (!visualViewportSuppliesScrollbars() && (autoHorizontalScrollBarChanged |
| autoVerticalScrollBarChanged)) { | 672 if (!visualViewportSuppliesScrollbars() && (autoHorizontalScrollBarChanged |
| autoVerticalScrollBarChanged)) { |
| 673 if (box().hasAutoHorizontalScrollbar()) | 673 if (box().hasAutoHorizontalScrollbar()) |
| 674 setHasHorizontalScrollbar(hasHorizontalOverflow); | 674 setHasHorizontalScrollbar(hasHorizontalOverflow); |
| 675 else if (box().style()->overflowX() == OSCROLL) | 675 else if (box().style()->overflowX() == OSCROLL) |
| 676 setHasHorizontalScrollbar(true); | 676 setHasHorizontalScrollbar(true); |
| 677 if (box().hasAutoVerticalScrollbar()) | 677 if (box().hasAutoVerticalScrollbar()) |
| 678 setHasVerticalScrollbar(hasVerticalOverflow); | 678 setHasVerticalScrollbar(hasVerticalOverflow); |
| 679 else if (box().style()->overflowY() == OSCROLL) | 679 else if (box().style()->overflowY() == OSCROLL) |
| 680 setHasVerticalScrollbar(true); | 680 setHasVerticalScrollbar(true); |
| 681 } | 681 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 bool hasOverflow = hasScrollableHorizontalOverflow() || hasScrollableVertica
lOverflow(); | 768 bool hasOverflow = hasScrollableHorizontalOverflow() || hasScrollableVertica
lOverflow(); |
| 769 updateScrollableAreaSet(hasOverflow); | 769 updateScrollableAreaSet(hasOverflow); |
| 770 | 770 |
| 771 DisableCompositingQueryAsserts disabler; | 771 DisableCompositingQueryAsserts disabler; |
| 772 positionOverflowControls(); | 772 positionOverflowControls(); |
| 773 } | 773 } |
| 774 | 774 |
| 775 void PaintLayerScrollableArea::updateAfterLayout() | 775 void PaintLayerScrollableArea::updateAfterLayout() |
| 776 { | 776 { |
| 777 DoubleSize originalScrollOffset; | 777 DoubleSize originalScrollOffset; |
| 778 bool autoHorizontalScrollBarChanged; | 778 bool autoHorizontalScrollBarChanged = false; |
| 779 bool autoVerticalScrollBarChanged; | 779 bool autoVerticalScrollBarChanged = false; |
| 780 updateScrollDimensions(originalScrollOffset, autoHorizontalScrollBarChanged,
autoVerticalScrollBarChanged); | 780 updateScrollDimensions(originalScrollOffset, autoHorizontalScrollBarChanged,
autoVerticalScrollBarChanged); |
| 781 finalizeScrollDimensions(originalScrollOffset, autoHorizontalScrollBarChange
d, autoVerticalScrollBarChanged); | 781 finalizeScrollDimensions(originalScrollOffset, autoHorizontalScrollBarChange
d, autoVerticalScrollBarChanged); |
| 782 } | 782 } |
| 783 | 783 |
| 784 ScrollBehavior PaintLayerScrollableArea::scrollBehaviorStyle() const | 784 ScrollBehavior PaintLayerScrollableArea::scrollBehaviorStyle() const |
| 785 { | 785 { |
| 786 return box().style()->scrollBehavior(); | 786 return box().style()->scrollBehavior(); |
| 787 } | 787 } |
| 788 | 788 |
| 789 bool PaintLayerScrollableArea::hasHorizontalOverflow() const | 789 bool PaintLayerScrollableArea::hasHorizontalOverflow() const |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 1581 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) |
| 1582 { | 1582 { |
| 1583 visitor->trace(m_scrollableArea); | 1583 visitor->trace(m_scrollableArea); |
| 1584 visitor->trace(m_hBar); | 1584 visitor->trace(m_hBar); |
| 1585 visitor->trace(m_vBar); | 1585 visitor->trace(m_vBar); |
| 1586 } | 1586 } |
| 1587 | 1587 |
| 1588 } // namespace blink | 1588 } // namespace blink |
| OLD | NEW |