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

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

Issue 2733633002: Handle nested position:sticky elements correctly (compositor) (Closed)
Patch Set: Addressed the easier reviewer comments. 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..e86f4bdd27f33f8bbe63902727b659ef3877bce3 100644
--- a/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
+++ b/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
@@ -48,7 +48,8 @@ class StickyPositionScrollingConstraints final {
other.m_nearestStickyBoxShiftingContainingBlock),
m_totalStickyBoxStickyOffset(other.m_totalStickyBoxStickyOffset),
m_totalContainingBlockStickyOffset(
- other.m_totalContainingBlockStickyOffset) {}
+ other.m_totalContainingBlockStickyOffset),
+ m_localStickyOffset(other.m_localStickyOffset) {}
FloatSize computeStickyOffset(
const FloatRect& viewportRect,
@@ -113,6 +114,8 @@ class StickyPositionScrollingConstraints final {
return m_totalContainingBlockStickyOffset;
}
+ const FloatSize& getLocalStickyOffset() const { return m_localStickyOffset; }
+
bool operator==(const StickyPositionScrollingConstraints& other) const {
return m_leftOffset == other.m_leftOffset &&
m_rightOffset == other.m_rightOffset &&
@@ -128,7 +131,8 @@ class StickyPositionScrollingConstraints final {
other.m_nearestStickyBoxShiftingContainingBlock &&
m_totalStickyBoxStickyOffset == other.m_totalStickyBoxStickyOffset &&
m_totalContainingBlockStickyOffset ==
- other.m_totalContainingBlockStickyOffset;
+ other.m_totalContainingBlockStickyOffset &&
+ m_localStickyOffset == other.m_localStickyOffset;
}
bool operator!=(const StickyPositionScrollingConstraints& other) const {
@@ -163,6 +167,8 @@ class StickyPositionScrollingConstraints final {
// LayoutBoxModelObjectTest.cpp.
FloatSize m_totalStickyBoxStickyOffset;
FloatSize m_totalContainingBlockStickyOffset;
+
+ FloatSize m_localStickyOffset;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698