Index: cc/trees/property_tree.h |
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h |
index 4f3a501cc20bf46b5538ee84d3875b78a3438c86..fe8382f65f7df5f9122475af94bb641135bd3c89 100644 |
--- a/cc/trees/property_tree.h |
+++ b/cc/trees/property_tree.h |
@@ -14,6 +14,7 @@ |
#include "cc/animation/element_id.h" |
#include "cc/base/cc_export.h" |
#include "cc/base/synced_property.h" |
+#include "cc/layers/layer_sticky_position_constraint.h" |
#include "cc/output/filter_operations.h" |
#include "ui/gfx/geometry/rect_f.h" |
#include "ui/gfx/geometry/scroll_offset.h" |
@@ -122,6 +123,14 @@ class CC_EXPORT PropertyTree { |
PropertyTrees* property_trees_; |
}; |
+struct StickyPositionNodeData { |
+ int scroll_ancestor; |
+ LayerStickyPositionConstraint constraints; |
+ gfx::Vector2dF main_thread_offset; |
ajuma
2016/09/08 22:08:54
Please add a comment explaining what this represen
flackr
2016/09/20 17:08:13
Done.
|
+ |
+ StickyPositionNodeData() : scroll_ancestor(-1) {} |
+}; |
+ |
class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> { |
public: |
TransformTree(); |
@@ -255,6 +264,9 @@ class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> { |
return cached_data_; |
} |
+ StickyPositionNodeData* StickyPositionData(int node_id); |
+ void SetNotSticky(int node_id); |
+ |
void ToProtobuf(proto::PropertyTree* proto) const; |
void FromProtobuf(const proto::PropertyTree& proto, |
std::unordered_map<int, int>* node_id_to_index_map); |
@@ -303,6 +315,8 @@ class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> { |
std::vector<int> nodes_affected_by_inner_viewport_bounds_delta_; |
std::vector<int> nodes_affected_by_outer_viewport_bounds_delta_; |
std::vector<TransformCachedNodeData> cached_data_; |
+ std::vector<StickyPositionNodeData> sticky_position_data_; |
+ std::vector<int> sticky_position_data_free_ids_; |
}; |
class CC_EXPORT ClipTree final : public PropertyTree<ClipNode> { |