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

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

Issue 2251303003: Implement position: sticky updates on compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with master and add comments to WebLayerStickyPositionConstraint members. 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
« no previous file with comments | « third_party/WebKit/public/platform/WebLayer.h ('k') | ui/gfx/transform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26 #ifndef WebLayerStickyPositionConstraint_h
27 #define WebLayerStickyPositionConstraint_h
28
29 namespace blink {
30
31 // TODO(flackr): Combine with WebLayerPositionConstraint.
32 struct WebLayerStickyPositionConstraint {
33 // True if the layer is sticky.
34 bool isSticky : 1;
35
36 // For each edge, true if the layer should stick to that edge of its
37 // ancestor scroller (or the viewport).
38 bool isAnchoredLeft : 1;
39 bool isAnchoredRight : 1;
40 bool isAnchoredTop : 1;
41 bool isAnchoredBottom : 1;
42
43 // For each edge, when the anchored bit above is set this gives the distance
44 // to keep the element from that edge of the ancestor scroller or viewport.
45 float leftOffset;
46 float rightOffset;
47 float topOffset;
48 float bottomOffset;
49
50 // The layout rectangle of the sticky element before it has been shifted
51 // to stick.
52 WebRect scrollContainerRelativeStickyBoxRect;
53
54 // The layout rectangle of the containing block edges which this sticky
55 // element should not be shifted beyond.
56 WebRect scrollContainerRelativeContainingBlockRect;
57
58 WebLayerStickyPositionConstraint()
59 : isSticky(false)
60 , isAnchoredLeft(false)
61 , isAnchoredRight(false)
62 , isAnchoredTop(false)
63 , isAnchoredBottom(false)
64 , leftOffset(0.f)
65 , rightOffset(0.f)
66 , topOffset(0.f)
67 , bottomOffset(0.f)
68 {
69 }
70 };
71
72 } // namespace blink
73
74 #endif // WebLayerStickyPositionConstraint_h
75
OLDNEW
« no previous file with comments | « third_party/WebKit/public/platform/WebLayer.h ('k') | ui/gfx/transform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698