| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@gmail.com> | 10 * Christian Biesinger <cbiesinger@gmail.com> |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 | 650 |
| 651 void PaintLayerScrollableArea::updateScrollDimensions() { | 651 void PaintLayerScrollableArea::updateScrollDimensions() { |
| 652 if (m_overflowRect.size() != box().layoutOverflowRect().size()) | 652 if (m_overflowRect.size() != box().layoutOverflowRect().size()) |
| 653 contentsResized(); | 653 contentsResized(); |
| 654 m_overflowRect = box().layoutOverflowRect(); | 654 m_overflowRect = box().layoutOverflowRect(); |
| 655 box().flipForWritingMode(m_overflowRect); | 655 box().flipForWritingMode(m_overflowRect); |
| 656 updateScrollOrigin(); | 656 updateScrollOrigin(); |
| 657 } | 657 } |
| 658 | 658 |
| 659 void PaintLayerScrollableArea::updateScrollbarEnabledState() { | 659 void PaintLayerScrollableArea::updateScrollbarEnabledState() { |
| 660 bool forceDisabled = ScrollbarTheme::theme().disableInvisibleScrollbars() && | 660 bool forceDisable = ScrollbarTheme::theme().disableInvisibleScrollbars() && |
| 661 scrollbarsHidden(); | 661 scrollbarsHidden(); |
| 662 // overflow:scroll should just enable/disable. | 662 |
| 663 if (box().style()->overflowX() == OverflowScroll && horizontalScrollbar()) { | 663 if (horizontalScrollbar()) |
| 664 horizontalScrollbar()->setEnabled(hasHorizontalOverflow() && | 664 horizontalScrollbar()->setEnabled(hasHorizontalOverflow() && !forceDisable); |
| 665 !forceDisabled); | 665 if (verticalScrollbar()) |
| 666 } | 666 verticalScrollbar()->setEnabled(hasVerticalOverflow() && !forceDisable); |
| 667 if (box().style()->overflowY() == OverflowScroll && verticalScrollbar()) { | |
| 668 verticalScrollbar()->setEnabled(hasVerticalOverflow() && !forceDisabled); | |
| 669 } | |
| 670 } | 667 } |
| 671 | 668 |
| 672 void PaintLayerScrollableArea::setScrollOffsetUnconditionally( | 669 void PaintLayerScrollableArea::setScrollOffsetUnconditionally( |
| 673 const ScrollOffset& offset, | 670 const ScrollOffset& offset, |
| 674 ScrollType scrollType) { | 671 ScrollType scrollType) { |
| 675 cancelScrollAnimation(); | 672 cancelScrollAnimation(); |
| 676 scrollOffsetChanged(offset, scrollType); | 673 scrollOffsetChanged(offset, scrollType); |
| 677 } | 674 } |
| 678 | 675 |
| 679 void PaintLayerScrollableArea::updateAfterLayout() { | 676 void PaintLayerScrollableArea::updateAfterLayout() { |
| (...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1978 | 1975 |
| 1979 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 1976 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
| 1980 clampScrollableAreas() { | 1977 clampScrollableAreas() { |
| 1981 for (auto& scrollableArea : *s_needsClamp) | 1978 for (auto& scrollableArea : *s_needsClamp) |
| 1982 scrollableArea->clampScrollOffsetsAfterLayout(); | 1979 scrollableArea->clampScrollOffsetsAfterLayout(); |
| 1983 delete s_needsClamp; | 1980 delete s_needsClamp; |
| 1984 s_needsClamp = nullptr; | 1981 s_needsClamp = nullptr; |
| 1985 } | 1982 } |
| 1986 | 1983 |
| 1987 } // namespace blink | 1984 } // namespace blink |
| OLD | NEW |