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

Side by Side Diff: cc/trees/property_tree.h

Issue 2636253002: Handle nested position:sticky elements (Closed)
Patch Set: Rebase Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_TREES_PROPERTY_TREE_H_ 5 #ifndef CC_TREES_PROPERTY_TREE_H_
6 #define CC_TREES_PROPERTY_TREE_H_ 6 #define CC_TREES_PROPERTY_TREE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 struct StickyPositionNodeData { 108 struct StickyPositionNodeData {
109 int scroll_ancestor; 109 int scroll_ancestor;
110 LayerStickyPositionConstraint constraints; 110 LayerStickyPositionConstraint constraints;
111 111
112 // This is the offset that blink has already applied to counteract the main 112 // This is the offset that blink has already applied to counteract the main
113 // thread scroll offset of the scroll ancestor. We need to account for this 113 // thread scroll offset of the scroll ancestor. We need to account for this
114 // by computing the additional offset necessary to keep the element stuck. 114 // by computing the additional offset necessary to keep the element stuck.
115 gfx::Vector2dF main_thread_offset; 115 gfx::Vector2dF main_thread_offset;
116 116
117 StickyPositionNodeData() : scroll_ancestor(-1) {} 117 int nearest_node_shifting_sticky_box;
118 int nearest_node_shifting_containing_block;
119
120 StickyPositionNodeData()
121 : scroll_ancestor(-1),
122 nearest_node_shifting_sticky_box(-1),
123 nearest_node_shifting_containing_block(-1) {}
118 }; 124 };
119 125
120 class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> { 126 class CC_EXPORT TransformTree final : public PropertyTree<TransformNode> {
121 public: 127 public:
122 TransformTree(); 128 TransformTree();
123 129
124 // These C++ special member functions cannot be implicit inline because 130 // These C++ special member functions cannot be implicit inline because
125 // they are exported by CC_EXPORT. They will be instantiated in every 131 // they are exported by CC_EXPORT. They will be instantiated in every
126 // compilation units that included this header, and compilation can fail 132 // compilation units that included this header, and compilation can fail
127 // because TransformCachedNodeData may be incomplete. 133 // because TransformCachedNodeData may be incomplete.
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const; 659 DrawTransforms& GetDrawTransforms(int transform_id, int effect_id) const;
654 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id, 660 DrawTransformData& FetchDrawTransformsDataFromCache(int transform_id,
655 int effect_id) const; 661 int effect_id) const;
656 662
657 PropertyTreesCachedData cached_data_; 663 PropertyTreesCachedData cached_data_;
658 }; 664 };
659 665
660 } // namespace cc 666 } // namespace cc
661 667
662 #endif // CC_TREES_PROPERTY_TREE_H_ 668 #endif // CC_TREES_PROPERTY_TREE_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698