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(); |
829 } | 833 } |
830 | 834 |
831 void PaintLayerScrollableArea::clampScrollOffsetAfterOverflowChange() { | 835 void PaintLayerScrollableArea::clampScrollOffsetAfterOverflowChange() { |
832 // If a vertical scrollbar was removed, the min/max scroll offsets may have | 836 // If a vertical scrollbar was removed, the min/max scroll offsets may have |
833 // changed, so the scroll offsets needs to be clamped. If the scroll offset | 837 // changed, so the scroll offsets needs to be clamped. If the scroll offset |
834 // did not change, but the scroll origin *did* change, we still need to notify | 838 // did not change, but the scroll origin *did* change, we still need to notify |
835 // the scrollbars to update their dimensions. | 839 // the scrollbars to update their dimensions. |
836 | 840 |
837 if (DelayScrollOffsetClampScope::clampingIsDelayed()) { | 841 if (DelayScrollOffsetClampScope::clampingIsDelayed()) { |
838 DelayScrollOffsetClampScope::setNeedsClamp(this); | 842 DelayScrollOffsetClampScope::setNeedsClamp(this); |
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2117 | 2121 |
2118 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2122 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
2119 clampScrollableAreas() { | 2123 clampScrollableAreas() { |
2120 for (auto& scrollableArea : *s_needsClamp) | 2124 for (auto& scrollableArea : *s_needsClamp) |
2121 scrollableArea->clampScrollOffsetAfterOverflowChange(); | 2125 scrollableArea->clampScrollOffsetAfterOverflowChange(); |
2122 delete s_needsClamp; | 2126 delete s_needsClamp; |
2123 s_needsClamp = nullptr; | 2127 s_needsClamp = nullptr; |
2124 } | 2128 } |
2125 | 2129 |
2126 } // namespace blink | 2130 } // namespace blink |
OLD | NEW |