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

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

Issue 2911463002: Unify the calculation of main thread offset of sticky element (Closed)
Patch Set: Move sticky offset computation into method in StickyPositionScrollingConstraints Created 3 years, 7 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 330d2d86334c79ac8050a50cc8565bc97c06bfeb..36dfa4fffebb7065e77663884675f079859b55f5 100644
--- a/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
+++ b/third_party/WebKit/Source/core/page/scrolling/StickyPositionScrollingConstraints.h
@@ -11,6 +11,7 @@
namespace blink {
class LayoutBoxModelObject;
+class PaintLayer;
class StickyPositionScrollingConstraints final {
public:
@@ -56,6 +57,9 @@ class StickyPositionScrollingConstraints final {
const StickyPositionScrollingConstraints*
ancestor_containing_block_constraints);
+ FloatSize ComputeMainThreadStickyOffset(
flackr 2017/06/02 15:33:58 Let's make this like GetTotalStickyBoxStickyOffset
yigu 2017/06/02 17:59:56 Done.
+ const PaintLayer& ancestor_overflow_layer) const;
+
bool HasAncestorStickyElement() const {
return nearest_sticky_box_shifting_sticky_box_ ||
nearest_sticky_box_shifting_containing_block_;

Powered by Google App Engine
This is Rietveld 408576698