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

Side by Side Diff: Source/core/rendering/RenderGrid.h

Issue 113943003: [CSS Grid] Introduce an explicit type for resolved grid positions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@to-land-zero
Patch Set: Created 6 years, 11 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 | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | Source/core/rendering/RenderGrid.cpp » ('j') | 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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 10 matching lines...) Expand all
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef RenderGrid_h 26 #ifndef RenderGrid_h
27 #define RenderGrid_h 27 #define RenderGrid_h
28 28
29 #include "core/rendering/OrderIterator.h" 29 #include "core/rendering/OrderIterator.h"
30 #include "core/rendering/RenderBlock.h" 30 #include "core/rendering/RenderBlock.h"
31 #include "core/rendering/style/GridResolvedPosition.h"
31 32
32 namespace WebCore { 33 namespace WebCore {
33 34
34 struct GridCoordinate; 35 struct GridCoordinate;
35 struct GridSpan; 36 struct GridSpan;
36 class GridTrack; 37 class GridTrack;
37 38
38 enum GridTrackSizingDirection { 39 enum GridTrackSizingDirection {
39 ForColumns, 40 ForColumns,
40 ForRows 41 ForRows
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 size_t explicitGridSizeForSide(GridPositionSide) const; 111 size_t explicitGridSizeForSide(GridPositionSide) const;
111 112
112 LayoutUnit logicalContentHeightForChild(RenderBox*, Vector<GridTrack>&); 113 LayoutUnit logicalContentHeightForChild(RenderBox*, Vector<GridTrack>&);
113 LayoutUnit minContentForChild(RenderBox*, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks); 114 LayoutUnit minContentForChild(RenderBox*, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks);
114 LayoutUnit maxContentForChild(RenderBox*, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks); 115 LayoutUnit maxContentForChild(RenderBox*, GridTrackSizingDirection, Vector<G ridTrack>& columnTracks);
115 LayoutPoint findChildLogicalPosition(RenderBox*, const GridSizingData&); 116 LayoutPoint findChildLogicalPosition(RenderBox*, const GridSizingData&);
116 GridCoordinate cachedGridCoordinate(const RenderBox*) const; 117 GridCoordinate cachedGridCoordinate(const RenderBox*) const;
117 118
118 GridSpan resolveGridPositionsFromAutoPlacementPosition(const RenderBox*, Gri dTrackSizingDirection, size_t) const; 119 GridSpan resolveGridPositionsFromAutoPlacementPosition(const RenderBox*, Gri dTrackSizingDirection, size_t) const;
119 PassOwnPtr<GridSpan> resolveGridPositionsFromStyle(const RenderBox*, GridTra ckSizingDirection) const; 120 PassOwnPtr<GridSpan> resolveGridPositionsFromStyle(const RenderBox*, GridTra ckSizingDirection) const;
120 size_t resolveNamedGridLinePositionFromStyle(const GridPosition&, GridPositi onSide) const; 121 GridResolvedPosition resolveNamedGridLinePositionFromStyle(const GridPositio n&, GridPositionSide) const;
121 size_t resolveGridPositionFromStyle(const GridPosition&, GridPositionSide) c onst; 122 GridResolvedPosition resolveGridPositionFromStyle(const GridPosition&, GridP ositionSide) const;
122 PassOwnPtr<GridSpan> resolveGridPositionAgainstOppositePosition(size_t resol vedOppositePosition, const GridPosition&, GridPositionSide) const; 123 PassOwnPtr<GridSpan> resolveGridPositionAgainstOppositePosition(const GridRe solvedPosition& resolvedOppositePosition, const GridPosition&, GridPositionSide) const;
123 PassOwnPtr<GridSpan> resolveNamedGridLinePositionAgainstOppositePosition(siz e_t resolvedOppositePosition, const GridPosition&, GridPositionSide) const; 124 PassOwnPtr<GridSpan> resolveNamedGridLinePositionAgainstOppositePosition(con st GridResolvedPosition& resolvedOppositePosition, const GridPosition&, GridPosi tionSide) const;
124 PassOwnPtr<GridSpan> resolveBeforeStartNamedGridLinePositionAgainstOppositeP osition(size_t resolvedOppositePosition, const GridPosition&, const Vector<size_ t>&) const;
125 PassOwnPtr<GridSpan> resolveAfterEndNamedGridLinePositionAgainstOppositePosi tion(size_t resolvedOppositePosition, const GridPosition&, const Vector<size_t>& ) const;
126 125
127 LayoutUnit gridAreaBreadthForChild(const RenderBox* child, GridTrackSizingDi rection, const Vector<GridTrack>&) const; 126 LayoutUnit gridAreaBreadthForChild(const RenderBox* child, GridTrackSizingDi rection, const Vector<GridTrack>&) const;
128 127
129 virtual void paintChildren(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL; 128 virtual void paintChildren(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL;
130 void paintChildrenSlowCase(PaintInfo&, const LayoutPoint&); 129 void paintChildrenSlowCase(PaintInfo&, const LayoutPoint&);
131 130
132 bool gridIsDirty() const { return m_gridIsDirty; } 131 bool gridIsDirty() const { return m_gridIsDirty; }
133 132
134 #ifndef NDEBUG 133 #ifndef NDEBUG
135 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto r<GridTrack>&); 134 bool tracksAreWiderThanMinTrackBreadth(GridTrackSizingDirection, const Vecto r<GridTrack>&);
(...skipping 19 matching lines...) Expand all
155 HashMap<const RenderBox*, GridCoordinate> m_gridItemCoordinate; 154 HashMap<const RenderBox*, GridCoordinate> m_gridItemCoordinate;
156 OrderIterator m_orderIterator; 155 OrderIterator m_orderIterator;
157 bool m_gridItemOverflowGridArea; 156 bool m_gridItemOverflowGridArea;
158 }; 157 };
159 158
160 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); 159 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid());
161 160
162 } // namespace WebCore 161 } // namespace WebCore
163 162
164 #endif // RenderGrid_h 163 #endif // RenderGrid_h
OLDNEW
« no previous file with comments | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | Source/core/rendering/RenderGrid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698