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

Side by Side Diff: Source/core/page/scrolling/ScrollingConstraints.h

Issue 267063007: Fix overconstrained behaviour for position: sticky. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 , m_anchorEdges(other.m_anchorEdges) 52 , m_anchorEdges(other.m_anchorEdges)
53 { } 53 { }
54 54
55 virtual ~ViewportConstraints() { } 55 virtual ~ViewportConstraints() { }
56 56
57 virtual ConstraintType constraintType() const = 0; 57 virtual ConstraintType constraintType() const = 0;
58 58
59 AnchorEdges anchorEdges() const { return m_anchorEdges; } 59 AnchorEdges anchorEdges() const { return m_anchorEdges; }
60 bool hasAnchorEdge(AnchorEdgeFlags flag) const { return m_anchorEdges & flag ; } 60 bool hasAnchorEdge(AnchorEdgeFlags flag) const { return m_anchorEdges & flag ; }
61 void addAnchorEdge(AnchorEdgeFlags edgeFlag) { m_anchorEdges |= edgeFlag; } 61 void addAnchorEdge(AnchorEdgeFlags edgeFlag) { m_anchorEdges |= edgeFlag; }
62 void removeAnchorEdge(AnchorEdgeFlags edgeFlag) { m_anchorEdges &= ~edgeFlag ; }
62 void setAnchorEdges(AnchorEdges edges) { m_anchorEdges = edges; } 63 void setAnchorEdges(AnchorEdges edges) { m_anchorEdges = edges; }
63 64
64 FloatSize alignmentOffset() const { return m_alignmentOffset; } 65 FloatSize alignmentOffset() const { return m_alignmentOffset; }
65 void setAlignmentOffset(const FloatSize& offset) { m_alignmentOffset = offse t; } 66 void setAlignmentOffset(const FloatSize& offset) { m_alignmentOffset = offse t; }
66 67
67 protected: 68 protected:
68 ViewportConstraints() 69 ViewportConstraints()
69 : m_anchorEdges(0) 70 : m_anchorEdges(0)
70 { } 71 { }
71 72
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 float m_bottomOffset; 181 float m_bottomOffset;
181 FloatRect m_absoluteContainingBlockRect; 182 FloatRect m_absoluteContainingBlockRect;
182 FloatRect m_absoluteStickyBoxRect; 183 FloatRect m_absoluteStickyBoxRect;
183 FloatSize m_stickyOffsetAtLastLayout; 184 FloatSize m_stickyOffsetAtLastLayout;
184 FloatPoint m_layerPositionAtLastLayout; 185 FloatPoint m_layerPositionAtLastLayout;
185 }; 186 };
186 187
187 } // namespace WebCore 188 } // namespace WebCore
188 189
189 #endif // ScrollingConstraints_h 190 #endif // ScrollingConstraints_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698