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

Unified Diff: cc/layers/layer_sticky_position_constraint.cc

Issue 2733633002: Handle nested position:sticky elements correctly (compositor) (Closed)
Patch Set: Add comment referencing crbug.com/702229 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: cc/layers/layer_sticky_position_constraint.cc
diff --git a/cc/layers/layer_sticky_position_constraint.cc b/cc/layers/layer_sticky_position_constraint.cc
index 79414d6a8775daeb4d3a0a67a9b4717cdb61432e..fa6e668af7fc8f702c7b8a8cd46db1c56c32e03d 100644
--- a/cc/layers/layer_sticky_position_constraint.cc
+++ b/cc/layers/layer_sticky_position_constraint.cc
@@ -15,7 +15,9 @@ LayerStickyPositionConstraint::LayerStickyPositionConstraint()
left_offset(0.f),
right_offset(0.f),
top_offset(0.f),
- bottom_offset(0.f) {}
+ bottom_offset(0.f),
+ nearest_layer_shifting_sticky_box(-1),
+ nearest_layer_shifting_containing_block(-1) {}
LayerStickyPositionConstraint::LayerStickyPositionConstraint(
const LayerStickyPositionConstraint& other)
@@ -33,7 +35,14 @@ LayerStickyPositionConstraint::LayerStickyPositionConstraint(
scroll_container_relative_sticky_box_rect(
other.scroll_container_relative_sticky_box_rect),
scroll_container_relative_containing_block_rect(
- other.scroll_container_relative_containing_block_rect) {}
+ other.scroll_container_relative_containing_block_rect),
+ nearest_layer_shifting_sticky_box(
+ other.nearest_layer_shifting_sticky_box),
+ nearest_layer_shifting_containing_block(
+ other.nearest_layer_shifting_containing_block),
+ total_sticky_box_sticky_offset(other.total_sticky_box_sticky_offset),
+ total_containing_block_sticky_offset(
+ other.total_containing_block_sticky_offset) {}
bool LayerStickyPositionConstraint::operator==(
const LayerStickyPositionConstraint& other) const {
@@ -52,7 +61,15 @@ bool LayerStickyPositionConstraint::operator==(
scroll_container_relative_sticky_box_rect ==
other.scroll_container_relative_sticky_box_rect &&
scroll_container_relative_containing_block_rect ==
- other.scroll_container_relative_containing_block_rect;
+ other.scroll_container_relative_containing_block_rect &&
+ nearest_layer_shifting_sticky_box ==
+ other.nearest_layer_shifting_sticky_box &&
+ nearest_layer_shifting_containing_block ==
+ other.nearest_layer_shifting_containing_block &&
+ total_sticky_box_sticky_offset ==
+ other.total_sticky_box_sticky_offset &&
+ total_containing_block_sticky_offset ==
+ other.total_containing_block_sticky_offset;
}
bool LayerStickyPositionConstraint::operator!=(

Powered by Google App Engine
This is Rietveld 408576698