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

Side by Side Diff: cc/layers/layer_sticky_position_constraint.cc

Issue 2401903002: Compute and include the offset of the sticky box to its enclosing composited layer. (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "cc/layers/layer_sticky_position_constraint.h" 5 #include "cc/layers/layer_sticky_position_constraint.h"
6 #include "cc/proto/gfx_conversions.h" 6 #include "cc/proto/gfx_conversions.h"
7 #include "cc/proto/layer_sticky_position_constraint.pb.h" 7 #include "cc/proto/layer_sticky_position_constraint.pb.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
(...skipping 12 matching lines...) Expand all
23 const LayerStickyPositionConstraint& other) 23 const LayerStickyPositionConstraint& other)
24 : is_sticky(other.is_sticky), 24 : is_sticky(other.is_sticky),
25 is_anchored_left(other.is_anchored_left), 25 is_anchored_left(other.is_anchored_left),
26 is_anchored_right(other.is_anchored_right), 26 is_anchored_right(other.is_anchored_right),
27 is_anchored_top(other.is_anchored_top), 27 is_anchored_top(other.is_anchored_top),
28 is_anchored_bottom(other.is_anchored_bottom), 28 is_anchored_bottom(other.is_anchored_bottom),
29 left_offset(other.left_offset), 29 left_offset(other.left_offset),
30 right_offset(other.right_offset), 30 right_offset(other.right_offset),
31 top_offset(other.top_offset), 31 top_offset(other.top_offset),
32 bottom_offset(other.bottom_offset), 32 bottom_offset(other.bottom_offset),
33 parent_relative_sticky_box_offset(
34 other.parent_relative_sticky_box_offset),
33 scroll_container_relative_sticky_box_rect( 35 scroll_container_relative_sticky_box_rect(
34 other.scroll_container_relative_sticky_box_rect), 36 other.scroll_container_relative_sticky_box_rect),
35 scroll_container_relative_containing_block_rect( 37 scroll_container_relative_containing_block_rect(
36 other.scroll_container_relative_containing_block_rect) {} 38 other.scroll_container_relative_containing_block_rect) {}
37 39
38 void LayerStickyPositionConstraint::ToProtobuf( 40 void LayerStickyPositionConstraint::ToProtobuf(
39 proto::LayerStickyPositionConstraint* proto) const { 41 proto::LayerStickyPositionConstraint* proto) const {
40 proto->set_is_sticky(is_sticky); 42 proto->set_is_sticky(is_sticky);
41 proto->set_is_anchored_left(is_anchored_left); 43 proto->set_is_anchored_left(is_anchored_left);
42 proto->set_is_anchored_right(is_anchored_right); 44 proto->set_is_anchored_right(is_anchored_right);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 scroll_container_relative_containing_block_rect == 88 scroll_container_relative_containing_block_rect ==
87 other.scroll_container_relative_containing_block_rect; 89 other.scroll_container_relative_containing_block_rect;
88 } 90 }
89 91
90 bool LayerStickyPositionConstraint::operator!=( 92 bool LayerStickyPositionConstraint::operator!=(
91 const LayerStickyPositionConstraint& other) const { 93 const LayerStickyPositionConstraint& other) const {
92 return !(*this == other); 94 return !(*this == other);
93 } 95 }
94 96
95 } // namespace cc 97 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698