Chromium Code Reviews| Index: cc/trees/property_tree.cc |
| diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc |
| index f450baa7067a5b3aa83fa9b6f08a201f17eb2e24..7fe6f360a987c7d3a26a8948605c76df543d5820 100644 |
| --- a/cc/trees/property_tree.cc |
| +++ b/cc/trees/property_tree.cc |
| @@ -372,7 +372,6 @@ gfx::Vector2dF StickyPositionOffset(TransformTree* tree, TransformNode* node) { |
| scroll_position, |
| gfx::SizeF(property_trees.scroll_tree.scroll_clip_layer_bounds( |
| scroll_node->id))); |
| - gfx::Vector2dF layer_offset(sticky_data->main_thread_offset); |
| gfx::Vector2dF ancestor_sticky_box_offset; |
| if (sticky_data->nearest_node_shifting_sticky_box != |
| @@ -457,7 +456,11 @@ gfx::Vector2dF StickyPositionOffset(TransformTree* tree, TransformNode* node) { |
| ancestor_sticky_box_offset + ancestor_containing_block_offset + |
| sticky_offset - sticky_box_rect.OffsetFromOrigin(); |
| - return sticky_offset - layer_offset - node->source_to_parent - |
| + gfx::Vector2dF sticky_main_thread_offset( |
|
flackr
2017/05/31 14:08:22
Rather than converting to a Vector2dF every time,
yigu
2017/06/01 15:15:19
Done.
|
| + node->sticky_main_thread_offset.width(), |
| + node->sticky_main_thread_offset.height()); |
| + |
| + return sticky_offset - sticky_main_thread_offset - |
| sticky_box_rect.OffsetFromOrigin(); |
| } |