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

Unified Diff: cc/layers/layer_sticky_position_constraint.cc

Issue 2636253002: Handle nested position:sticky elements (Closed)
Patch Set: First attempt at compositing side, does NOT work properly yet Created 3 years, 11 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..b74478532601b5ca5a7730f34c931e5cac1b26d1 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_sticky_element_shifting_sticky_box(nullptr),
+ nearest_sticky_element_shifting_containing_block(nullptr) {}
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_sticky_element_shifting_sticky_box(
+ other.nearest_sticky_element_shifting_sticky_box),
+ nearest_sticky_element_shifting_containing_block(
+ other.nearest_sticky_element_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_sticky_element_shifting_sticky_box ==
+ other.nearest_sticky_element_shifting_sticky_box &&
+ nearest_sticky_element_shifting_containing_block ==
+ other.nearest_sticky_element_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