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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
819 | 819 |
820 clampScrollOffsetAfterOverflowChange(); | 820 clampScrollOffsetAfterOverflowChange(); |
821 | 821 |
822 if (!scrollbarsAreFrozen) { | 822 if (!scrollbarsAreFrozen) { |
823 updateScrollableAreaSet(hasScrollableHorizontalOverflow() || | 823 updateScrollableAreaSet(hasScrollableHorizontalOverflow() || |
824 hasScrollableVerticalOverflow()); | 824 hasScrollableVerticalOverflow()); |
825 } | 825 } |
826 | 826 |
827 DisableCompositingQueryAsserts disabler; | 827 DisableCompositingQueryAsserts disabler; |
828 positionOverflowControls(); | 828 positionOverflowControls(); |
829 | |
830 // Layout of a scrollable area, or any of its descendants (sticky or | |
831 // otherwise), invalidates the cached sticky constraints. | |
832 invalidateAllStickyConstraints(); | |
833 } | 829 } |
834 | 830 |
835 void PaintLayerScrollableArea::clampScrollOffsetAfterOverflowChange() { | 831 void PaintLayerScrollableArea::clampScrollOffsetAfterOverflowChange() { |
836 // If a vertical scrollbar was removed, the min/max scroll offsets may have | 832 // If a vertical scrollbar was removed, the min/max scroll offsets may have |
837 // changed, so the scroll offsets needs to be clamped. If the scroll offset | 833 // changed, so the scroll offsets needs to be clamped. If the scroll offset |
838 // did not change, but the scroll origin *did* change, we still need to notify | 834 // did not change, but the scroll origin *did* change, we still need to notify |
839 // the scrollbars to update their dimensions. | 835 // the scrollbars to update their dimensions. |
840 | 836 |
841 if (DelayScrollOffsetClampScope::clampingIsDelayed()) { | 837 if (DelayScrollOffsetClampScope::clampingIsDelayed()) { |
842 DelayScrollOffsetClampScope::setNeedsClamp(this); | 838 DelayScrollOffsetClampScope::setNeedsClamp(this); |
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 | 2117 |
2122 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2118 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
2123 clampScrollableAreas() { | 2119 clampScrollableAreas() { |
2124 for (auto& scrollableArea : *s_needsClamp) | 2120 for (auto& scrollableArea : *s_needsClamp) |
2125 scrollableArea->clampScrollOffsetAfterOverflowChange(); | 2121 scrollableArea->clampScrollOffsetAfterOverflowChange(); |
2126 delete s_needsClamp; | 2122 delete s_needsClamp; |
2127 s_needsClamp = nullptr; | 2123 s_needsClamp = nullptr; |
2128 } | 2124 } |
2129 | 2125 |
2130 } // namespace blink | 2126 } // namespace blink |
OLD | NEW |