Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp

Issue 2696093003: Always invalidate sticky constraints on the ancestor overflow layer (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObjectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
index 883758e27529c6b0d09f787ffbd90dbf53bc27f5..f46b29a9ebec2fb3b74f95cca29a52aec2a8c775 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -424,15 +424,24 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
}
void LayoutBoxModelObject::invalidateStickyConstraints() {
- if (!layer())
- return;
+ PaintLayer* enclosing = enclosingLayer();
+
+ if (PaintLayerScrollableArea* scrollableArea =
+ enclosing->getScrollableArea()) {
+ scrollableArea->invalidateAllStickyConstraints();
+ // If this object doesn't have a layer and its enclosing layer is a scroller
+ // then we don't need to invalidate the sticky constraints on the ancestor
+ // scroller because the enclosing scroller won't have changed size.
+ if (!layer())
+ return;
+ }
// This intentionally uses the stale ancestor overflow layer compositing input
// as if we have saved constraints for this layer they were saved in the
// previous frame.
DisableCompositingQueryAsserts disabler;
if (const PaintLayer* ancestorOverflowLayer =
- layer()->ancestorOverflowLayer())
+ enclosing->ancestorOverflowLayer())
ancestorOverflowLayer->getScrollableArea()
->invalidateAllStickyConstraints();
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBoxModelObjectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698