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

Unified Diff: public/platform/WebLayerPositionConstraint.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
« Source/core/paint/DeprecatedPaintLayer.cpp ('K') | « public/platform/WebLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebLayerPositionConstraint.h
diff --git a/public/platform/WebLayerPositionConstraint.h b/public/platform/WebLayerPositionConstraint.h
index 973a06faf00aa57edddeaf13f5d894a1e6ea055a..4f24cb91fed799a825d87a9fbb4ef24f1ce0cf95 100644
--- a/public/platform/WebLayerPositionConstraint.h
+++ b/public/platform/WebLayerPositionConstraint.h
@@ -26,6 +26,8 @@
#ifndef WebLayerPositionConstraint_h
#define WebLayerPositionConstraint_h
+#include "public/platform/WebRect.h"
+
namespace blink {
struct WebLayerPositionConstraint {
@@ -50,6 +52,37 @@ struct WebLayerPositionConstraint {
}
};
+// TODO(flackr): Combine with the fixed position constraint above?
enne (OOO) 2015/09/17 16:57:40 Yeah, I think this should probably be merged with
+struct WebLayerStickyPositionConstraint {
+ bool isSticky : 1;
+ bool isAnchoredLeft : 1;
+ bool isAnchoredRight : 1;
+ bool isAnchoredTop : 1;
+ bool isAnchoredBottom : 1;
+
+ float leftOffset;
+ float rightOffset;
+ float topOffset;
+ float bottomOffset;
+
+ WebRect absoluteStickyBoxRect;
enne (OOO) 2015/09/17 16:57:40 Are these values redundant with WebLayer's bounds
flackr 2015/09/22 22:25:32 I don't think so, but please correct me if I am mi
+ WebRect absoluteContainingBlockRect;
+
+ // TODO(flackr): Add fancy ctor and static creation sugar.
+ WebLayerStickyPositionConstraint()
+ : isSticky(false)
+ , isAnchoredLeft(false)
+ , isAnchoredRight(false)
+ , isAnchoredTop(false)
+ , isAnchoredBottom(false)
+ , leftOffset(0.f)
+ , rightOffset(0.f)
+ , topOffset(0.f)
+ , bottomOffset(0.f)
+ {
+ }
+};
+
} // namespace blink
#endif // WebLayerPositionConstraint_h
« Source/core/paint/DeprecatedPaintLayer.cpp ('K') | « public/platform/WebLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698