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@gmail.com> | 9 * Christian Biesinger <cbiesinger@gmail.com> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 | 763 |
764 setNeedsScrollPositionClamp(false); | 764 setNeedsScrollPositionClamp(false); |
765 resetScrollOriginChanged(); | 765 resetScrollOriginChanged(); |
766 m_scrollbarManager.destroyDetachedScrollbars(); | 766 m_scrollbarManager.destroyDetachedScrollbars(); |
767 } | 767 } |
768 | 768 |
769 bool PaintLayerScrollableArea::shouldPerformScrollAnchoring() const | 769 bool PaintLayerScrollableArea::shouldPerformScrollAnchoring() const |
770 { | 770 { |
771 return RuntimeEnabledFeatures::scrollAnchoringEnabled() | 771 return RuntimeEnabledFeatures::scrollAnchoringEnabled() |
772 && m_scrollAnchor.hasScroller() | 772 && m_scrollAnchor.hasScroller() |
773 && layoutBox()->style()->overflowAnchor() != AnchorNone; | 773 && layoutBox()->style()->overflowAnchor() != AnchorNone |
| 774 && box().frame()->view()->userMayHaveDragged(); |
774 } | 775 } |
775 | 776 |
776 ScrollBehavior PaintLayerScrollableArea::scrollBehaviorStyle() const | 777 ScrollBehavior PaintLayerScrollableArea::scrollBehaviorStyle() const |
777 { | 778 { |
778 return box().style()->getScrollBehavior(); | 779 return box().style()->getScrollBehavior(); |
779 } | 780 } |
780 | 781 |
781 bool PaintLayerScrollableArea::hasHorizontalOverflow() const | 782 bool PaintLayerScrollableArea::hasHorizontalOverflow() const |
782 { | 783 { |
783 // TODO(szager): Make the algorithm for adding/subtracting overflow:auto | 784 // TODO(szager): Make the algorithm for adding/subtracting overflow:auto |
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1758 | 1759 |
1759 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre
as() | 1760 void PaintLayerScrollableArea::DelayScrollPositionClampScope::clampScrollableAre
as() |
1760 { | 1761 { |
1761 for (auto& scrollableArea : *s_needsClamp) | 1762 for (auto& scrollableArea : *s_needsClamp) |
1762 scrollableArea->clampScrollPositionsAfterLayout(); | 1763 scrollableArea->clampScrollPositionsAfterLayout(); |
1763 delete s_needsClamp; | 1764 delete s_needsClamp; |
1764 s_needsClamp = nullptr; | 1765 s_needsClamp = nullptr; |
1765 } | 1766 } |
1766 | 1767 |
1767 } // namespace blink | 1768 } // namespace blink |
OLD | NEW |