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

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

Issue 2825343003: Clean compositing inputs for location APIs for sticky-affected elements. (Closed)
Patch Set: Created 3 years, 8 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
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 562f5bb5d925ff0cf8a10835865133e3378b361a..2b4c6b5186c5d55ae2fa42585edcd96e356d3243 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -146,7 +146,7 @@ bool LayoutBoxModelObject::HasAcceleratedCompositing() const {
}
LayoutBoxModelObject::LayoutBoxModelObject(ContainerNode* node)
- : LayoutObject(node) {}
+ : LayoutObject(node), is_in_sticky_subtree_(false) {}
bool LayoutBoxModelObject::UsesCompositedScrolling() const {
return HasOverflowClip() && HasLayer() &&
@@ -477,6 +477,11 @@ void LayoutBoxModelObject::StyleDidChange(StyleDifference diff,
else
frame_view->RemoveViewportConstrainedObject(*this);
}
+
+ is_in_sticky_subtree_ =
+ new_style_is_sticky ||
+ (Parent() && Parent()->EnclosingBoxModelObject() &&
chrishtr 2017/04/20 17:40:34 Shouldn't this use the containing block chain, not
smcgruer 2017/04/26 14:37:07 No longer relevant; see new PS.
+ Parent()->EnclosingBoxModelObject()->IsInStickySubtree());
}
}

Powered by Google App Engine
This is Rietveld 408576698