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

Unified Diff: Source/core/layout/LayoutBoxModelObject.h

Issue 1308273010: Adapt and reland old position sticky implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix style errors and remaining layout tests. Created 5 years, 3 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: Source/core/layout/LayoutBoxModelObject.h
diff --git a/Source/core/layout/LayoutBoxModelObject.h b/Source/core/layout/LayoutBoxModelObject.h
index edcf78af70dd276cbf2efcafe373c7ec25676abd..062acc6be6e7a4bc1a47e5927910da8db1ade07a 100644
--- a/Source/core/layout/LayoutBoxModelObject.h
+++ b/Source/core/layout/LayoutBoxModelObject.h
@@ -62,6 +62,7 @@ enum ContentChangeType {
};
class InlineFlowBox;
+class StickyPositionViewportConstraints;
// This class is the base for all objects that adhere to the CSS box model as described
// at http://www.w3.org/TR/CSS21/box.html
@@ -77,6 +78,10 @@ public:
LayoutSize relativePositionOffset() const;
LayoutSize relativePositionLogicalOffset() const { return style()->isHorizontalWritingMode() ? relativePositionOffset() : relativePositionOffset().transposedSize(); }
+ void computeStickyPositionConstraints(StickyPositionViewportConstraints&, const LayoutRect& constrainingRect) const;
chrishtr 2015/09/17 01:18:56 What are the return values from this? What space i
flackr 2015/10/07 20:38:11 Added a comment.
+ LayoutRect computeStickyConstrainingRect() const;
+ LayoutSize stickyPositionOffset() const;
+
LayoutSize offsetForInFlowPosition() const;
// IE extensions. Used to calculate offsetWidth/Height. Overridden by inlines (LayoutFlow)
@@ -270,6 +275,8 @@ private:
LayoutUnit computedCSSPadding(const Length&) const;
bool isBoxModelObject() const final { return true; }
+ virtual LayoutRect frameRectForStickyPositioning() const = 0;
skobes 2015/09/16 00:07:57 Can you add a comment explaining what this is and
flackr 2015/10/07 20:38:11 Done.
+
OwnPtr<DeprecatedPaintLayer> m_layer;
};

Powered by Google App Engine
This is Rietveld 408576698