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

Unified Diff: third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h
diff --git a/third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h b/third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h
index 296496d76f24a22d2545fa38c5d5c6555e31f2ef..1c3dd455a357bc9a210d096cf0977cd744036005 100644
--- a/third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h
+++ b/third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h
@@ -26,8 +26,9 @@
#ifndef WebLayerStickyPositionConstraint_h
#define WebLayerStickyPositionConstraint_h
-#include "public/platform/WebPoint.h"
-#include "public/platform/WebRect.h"
+#include "public/platform/WebFloatPoint.h"
+#include "public/platform/WebFloatRect.h"
+#include "public/platform/WebLayer.h"
namespace blink {
@@ -52,15 +53,20 @@ struct WebLayerStickyPositionConstraint {
// This is the layout position of the sticky element before it has been
// shifted relative to the enclosing composited layer.
- WebPoint parentRelativeStickyBoxOffset;
+ WebFloatPoint parentRelativeStickyBoxOffset;
chrishtr 2017/03/20 17:24:52 Are these now floating-point to account for adding
smcgruer 2017/03/21 13:54:55 This came about due to flackr's concerns about los
smcgruer 2017/03/21 16:01:25 Discussed with flackr. I overreached in my cleanup
smcgruer 2017/03/21 17:37:48 Done.
// The layout rectangle of the sticky element before it has been shifted
// to stick.
- WebRect scrollContainerRelativeStickyBoxRect;
+ WebFloatRect scrollContainerRelativeStickyBoxRect;
// The layout rectangle of the containing block edges which this sticky
// element should not be shifted beyond.
- WebRect scrollContainerRelativeContainingBlockRect;
+ WebFloatRect scrollContainerRelativeContainingBlockRect;
+
+ // The nearest ancestor sticky layers that affect the sticky box constraint
+ // rect and the containing block constraint rect respectively.
+ int nearestLayerShiftingStickyBox;
+ int nearestLayerShiftingContainingBlock;
WebLayerStickyPositionConstraint()
: isSticky(false),
@@ -71,7 +77,9 @@ struct WebLayerStickyPositionConstraint {
leftOffset(0.f),
rightOffset(0.f),
topOffset(0.f),
- bottomOffset(0.f) {}
+ bottomOffset(0.f),
+ nearestLayerShiftingStickyBox(WebLayer::kInvalidLayerId),
+ nearestLayerShiftingContainingBlock(WebLayer::kInvalidLayerId) {}
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698