| 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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 823 ScrollableArea::setScrollOffset(scrollOffset(), ProgrammaticScroll); | 823 ScrollableArea::setScrollOffset(scrollOffset(), ProgrammaticScroll); |
| 824 | 824 |
| 825 setNeedsScrollOffsetClamp(false); | 825 setNeedsScrollOffsetClamp(false); |
| 826 resetScrollOriginChanged(); | 826 resetScrollOriginChanged(); |
| 827 m_scrollbarManager.destroyDetachedScrollbars(); | 827 m_scrollbarManager.destroyDetachedScrollbars(); |
| 828 } | 828 } |
| 829 | 829 |
| 830 bool PaintLayerScrollableArea::shouldPerformScrollAnchoring() const { | 830 bool PaintLayerScrollableArea::shouldPerformScrollAnchoring() const { |
| 831 return RuntimeEnabledFeatures::scrollAnchoringEnabled() && | 831 return RuntimeEnabledFeatures::scrollAnchoringEnabled() && |
| 832 m_scrollAnchor.hasScroller() && | 832 m_scrollAnchor.hasScroller() && |
| 833 layoutBox()->style()->overflowAnchor() != AnchorNone; | 833 layoutBox()->style()->overflowAnchor() != AnchorNone && |
| 834 !box().document().finishingOrIsPrinting(); |
| 834 } | 835 } |
| 835 | 836 |
| 836 ScrollBehavior PaintLayerScrollableArea::scrollBehaviorStyle() const { | 837 ScrollBehavior PaintLayerScrollableArea::scrollBehaviorStyle() const { |
| 837 return box().style()->getScrollBehavior(); | 838 return box().style()->getScrollBehavior(); |
| 838 } | 839 } |
| 839 | 840 |
| 840 bool PaintLayerScrollableArea::hasHorizontalOverflow() const { | 841 bool PaintLayerScrollableArea::hasHorizontalOverflow() const { |
| 841 // TODO(szager): Make the algorithm for adding/subtracting overflow:auto | 842 // TODO(szager): Make the algorithm for adding/subtracting overflow:auto |
| 842 // scrollbars memoryless (crbug.com/625300). This clientWidth hack will | 843 // scrollbars memoryless (crbug.com/625300). This clientWidth hack will |
| 843 // prevent the spurious horizontal scrollbar, but it can cause a converse | 844 // prevent the spurious horizontal scrollbar, but it can cause a converse |
| (...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1978 | 1979 |
| 1979 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 1980 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
| 1980 clampScrollableAreas() { | 1981 clampScrollableAreas() { |
| 1981 for (auto& scrollableArea : *s_needsClamp) | 1982 for (auto& scrollableArea : *s_needsClamp) |
| 1982 scrollableArea->clampScrollOffsetsAfterLayout(); | 1983 scrollableArea->clampScrollOffsetsAfterLayout(); |
| 1983 delete s_needsClamp; | 1984 delete s_needsClamp; |
| 1984 s_needsClamp = nullptr; | 1985 s_needsClamp = nullptr; |
| 1985 } | 1986 } |
| 1986 | 1987 |
| 1987 } // namespace blink | 1988 } // namespace blink |
| OLD | NEW |