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

Side by Side Diff: third_party/WebKit/public/platform/WebLayerStickyPositionConstraint.h

Issue 2911463002: Unify the calculation of main thread offset of sticky element (Closed)
Patch Set: Bug fix Created 3 years, 6 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 | « third_party/WebKit/public/platform/WebLayer.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 bool is_anchored_top : 1; 44 bool is_anchored_top : 1;
45 bool is_anchored_bottom : 1; 45 bool is_anchored_bottom : 1;
46 46
47 // For each edge, when the anchored bit above is set this gives the distance 47 // For each edge, when the anchored bit above is set this gives the distance
48 // to keep the element from that edge of the ancestor scroller or viewport. 48 // to keep the element from that edge of the ancestor scroller or viewport.
49 float left_offset; 49 float left_offset;
50 float right_offset; 50 float right_offset;
51 float top_offset; 51 float top_offset;
52 float bottom_offset; 52 float bottom_offset;
53 53
54 // This is the layout position of the sticky element before it has been
55 // shifted relative to the enclosing composited layer.
56 WebPoint parent_relative_sticky_box_offset;
57
58 // The layout rectangle of the sticky element before it has been shifted 54 // The layout rectangle of the sticky element before it has been shifted
59 // to stick. 55 // to stick.
60 WebRect scroll_container_relative_sticky_box_rect; 56 WebRect scroll_container_relative_sticky_box_rect;
61 57
62 // The layout rectangle of the containing block edges which this sticky 58 // The layout rectangle of the containing block edges which this sticky
63 // element should not be shifted beyond. 59 // element should not be shifted beyond.
64 WebRect scroll_container_relative_containing_block_rect; 60 WebRect scroll_container_relative_containing_block_rect;
65 61
66 // The nearest ancestor sticky layers that affect the sticky box constraint 62 // The nearest ancestor sticky layers that affect the sticky box constraint
67 // rect and the containing block constraint rect respectively. 63 // rect and the containing block constraint rect respectively.
(...skipping 10 matching lines...) Expand all
78 right_offset(0.f), 74 right_offset(0.f),
79 top_offset(0.f), 75 top_offset(0.f),
80 bottom_offset(0.f), 76 bottom_offset(0.f),
81 nearest_layer_shifting_sticky_box(WebLayer::kInvalidLayerId), 77 nearest_layer_shifting_sticky_box(WebLayer::kInvalidLayerId),
82 nearest_layer_shifting_containing_block(WebLayer::kInvalidLayerId) {} 78 nearest_layer_shifting_containing_block(WebLayer::kInvalidLayerId) {}
83 }; 79 };
84 80
85 } // namespace blink 81 } // namespace blink
86 82
87 #endif // WebLayerStickyPositionConstraint_h 83 #endif // WebLayerStickyPositionConstraint_h
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698