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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef StickyPositionScrollingConstraints_h 5 #ifndef StickyPositionScrollingConstraints_h
6 #define StickyPositionScrollingConstraints_h 6 #define StickyPositionScrollingConstraints_h
7 7
8 #include "platform/geometry/FloatRect.h" 8 #include "platform/geometry/FloatRect.h"
9 #include "platform/geometry/FloatSize.h" 9 #include "platform/geometry/FloatSize.h"
10 10
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return m_nearestStickyBoxShiftingContainingBlock; 106 return m_nearestStickyBoxShiftingContainingBlock;
107 } 107 }
108 108
109 const FloatSize& getTotalStickyBoxStickyOffset() const { 109 const FloatSize& getTotalStickyBoxStickyOffset() const {
110 return m_totalStickyBoxStickyOffset; 110 return m_totalStickyBoxStickyOffset;
111 } 111 }
112 const FloatSize& getTotalContainingBlockStickyOffset() const { 112 const FloatSize& getTotalContainingBlockStickyOffset() const {
113 return m_totalContainingBlockStickyOffset; 113 return m_totalContainingBlockStickyOffset;
114 } 114 }
115 115
116 const LayoutBoxModelObject* nearestStickyAncestor() const {
117 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.
118 ? m_nearestStickyBoxShiftingStickyBox
119 : m_nearestStickyBoxShiftingContainingBlock;
120 }
121
116 bool operator==(const StickyPositionScrollingConstraints& other) const { 122 bool operator==(const StickyPositionScrollingConstraints& other) const {
117 return m_leftOffset == other.m_leftOffset && 123 return m_leftOffset == other.m_leftOffset &&
118 m_rightOffset == other.m_rightOffset && 124 m_rightOffset == other.m_rightOffset &&
119 m_topOffset == other.m_topOffset && 125 m_topOffset == other.m_topOffset &&
120 m_bottomOffset == other.m_bottomOffset && 126 m_bottomOffset == other.m_bottomOffset &&
121 m_scrollContainerRelativeContainingBlockRect == 127 m_scrollContainerRelativeContainingBlockRect ==
122 other.m_scrollContainerRelativeContainingBlockRect && 128 other.m_scrollContainerRelativeContainingBlockRect &&
123 m_scrollContainerRelativeStickyBoxRect == 129 m_scrollContainerRelativeStickyBoxRect ==
124 other.m_scrollContainerRelativeStickyBoxRect && 130 other.m_scrollContainerRelativeStickyBoxRect &&
125 m_nearestStickyBoxShiftingStickyBox == 131 m_nearestStickyBoxShiftingStickyBox ==
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // constraining block constriant rect for different sticky descendants is 167 // constraining block constriant rect for different sticky descendants is
162 // quite complex. See the StickyPositionComplexTableNesting test in 168 // quite complex. See the StickyPositionComplexTableNesting test in
163 // LayoutBoxModelObjectTest.cpp. 169 // LayoutBoxModelObjectTest.cpp.
164 FloatSize m_totalStickyBoxStickyOffset; 170 FloatSize m_totalStickyBoxStickyOffset;
165 FloatSize m_totalContainingBlockStickyOffset; 171 FloatSize m_totalContainingBlockStickyOffset;
166 }; 172 };
167 173
168 } // namespace blink 174 } // namespace blink
169 175
170 #endif // StickyPositionScrollingConstraints_h 176 #endif // StickyPositionScrollingConstraints_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698