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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h

Issue 2733633002: Handle nested position:sticky elements correctly (compositor) (Closed)
Patch Set: Use FindNodeIndexFromOwningLayerId Created 3 years, 9 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/page/scrolling/StickyPositionScrollingConstraints.h
diff --git a/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h b/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
index 84dab3cc2f76ad7170d18bed9235375e5dc16c62..cc60c139b029dac6e5a511591c5fb383ff0c21b4 100644
--- a/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
+++ b/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
@@ -113,6 +113,12 @@ class StickyPositionScrollingConstraints final {
return m_totalContainingBlockStickyOffset;
}
+ const LayoutBoxModelObject* nearestStickyAncestor() const {
+ return m_nearestStickyBoxShiftingStickyBox
chrishtr 2017/03/20 17:24:52 It's not obvious to me why this is correct. Could
smcgruer 2017/03/21 13:54:54 Done.
+ ? m_nearestStickyBoxShiftingStickyBox
+ : m_nearestStickyBoxShiftingContainingBlock;
+ }
+
bool operator==(const StickyPositionScrollingConstraints& other) const {
return m_leftOffset == other.m_leftOffset &&
m_rightOffset == other.m_rightOffset &&

Powered by Google App Engine
This is Rietveld 408576698