Chromium Code Reviews| 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 846 | 846 |
| 847 ClampScrollOffsetAfterOverflowChange(); | 847 ClampScrollOffsetAfterOverflowChange(); |
| 848 | 848 |
| 849 if (!scrollbars_are_frozen) { | 849 if (!scrollbars_are_frozen) { |
| 850 UpdateScrollableAreaSet(HasScrollableHorizontalOverflow() || | 850 UpdateScrollableAreaSet(HasScrollableHorizontalOverflow() || |
| 851 HasScrollableVerticalOverflow()); | 851 HasScrollableVerticalOverflow()); |
| 852 } | 852 } |
| 853 | 853 |
| 854 DisableCompositingQueryAsserts disabler; | 854 DisableCompositingQueryAsserts disabler; |
| 855 PositionOverflowControls(); | 855 PositionOverflowControls(); |
| 856 | |
| 857 // Layout of a scrollable area, or any of its descendants (sticky or | |
| 858 // otherwise), invalidates the cached sticky constraints. | |
| 859 InvalidateAllStickyConstraints(); | |
|
chrishtr
2017/04/20 17:40:34
This looks like an independent bug. Does it deserv
smcgruer
2017/04/26 14:37:07
Yes, it probably does. Removed the scroll related
| |
| 856 } | 860 } |
| 857 | 861 |
| 858 void PaintLayerScrollableArea::ClampScrollOffsetAfterOverflowChange() { | 862 void PaintLayerScrollableArea::ClampScrollOffsetAfterOverflowChange() { |
| 859 // If a vertical scrollbar was removed, the min/max scroll offsets may have | 863 // If a vertical scrollbar was removed, the min/max scroll offsets may have |
| 860 // changed, so the scroll offsets needs to be clamped. If the scroll offset | 864 // changed, so the scroll offsets needs to be clamped. If the scroll offset |
| 861 // did not change, but the scroll origin *did* change, we still need to notify | 865 // did not change, but the scroll origin *did* change, we still need to notify |
| 862 // the scrollbars to update their dimensions. | 866 // the scrollbars to update their dimensions. |
| 863 | 867 |
| 864 if (DelayScrollOffsetClampScope::ClampingIsDelayed()) { | 868 if (DelayScrollOffsetClampScope::ClampingIsDelayed()) { |
| 865 DelayScrollOffsetClampScope::SetNeedsClamp(this); | 869 DelayScrollOffsetClampScope::SetNeedsClamp(this); |
| (...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2133 | 2137 |
| 2134 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: | 2138 void PaintLayerScrollableArea::DelayScrollOffsetClampScope:: |
| 2135 ClampScrollableAreas() { | 2139 ClampScrollableAreas() { |
| 2136 for (auto& scrollable_area : *needs_clamp_) | 2140 for (auto& scrollable_area : *needs_clamp_) |
| 2137 scrollable_area->ClampScrollOffsetAfterOverflowChange(); | 2141 scrollable_area->ClampScrollOffsetAfterOverflowChange(); |
| 2138 delete needs_clamp_; | 2142 delete needs_clamp_; |
| 2139 needs_clamp_ = nullptr; | 2143 needs_clamp_ = nullptr; |
| 2140 } | 2144 } |
| 2141 | 2145 |
| 2142 } // namespace blink | 2146 } // namespace blink |
| OLD | NEW |