OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef GridResolvedPosition_h | 5 #ifndef GridResolvedPosition_h |
6 #define GridResolvedPosition_h | 6 #define GridResolvedPosition_h |
7 | 7 |
8 #include "core/rendering/style/GridPosition.h" | 8 #include "core/rendering/style/GridPosition.h" |
9 | 9 |
10 namespace WebCore { | 10 namespace WebCore { |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 static size_t adjustGridPositionForSide(size_t resolvedPosition, GridPositio
nSide side) | 37 static size_t adjustGridPositionForSide(size_t resolvedPosition, GridPositio
nSide side) |
38 { | 38 { |
39 // An item finishing on the N-th line belongs to the N-1-th cell. | 39 // An item finishing on the N-th line belongs to the N-1-th cell. |
40 if (side == ColumnEndSide || side == RowEndSide) | 40 if (side == ColumnEndSide || side == RowEndSide) |
41 return adjustGridPositionForAfterEndSide(resolvedPosition); | 41 return adjustGridPositionForAfterEndSide(resolvedPosition); |
42 | 42 |
43 return resolvedPosition; | 43 return resolvedPosition; |
44 } | 44 } |
45 | 45 |
46 static GridSpan resolveGridPositionsFromAutoPlacementPosition(const RenderBo
x&, GridTrackSizingDirection, const GridResolvedPosition&); | 46 static void initialAndFinalPositionsFromStyle(const RenderStyle&, const Rend
erBox&, GridTrackSizingDirection, GridPosition &initialPosition, GridPosition &f
inalPosition); |
| 47 static PassOwnPtr<GridSpan> resolveGridPositionsFromAutoPlacementPosition(co
nst RenderStyle&, const RenderBox&, GridTrackSizingDirection, const GridResolved
Position&); |
47 static PassOwnPtr<GridSpan> resolveGridPositionsFromStyle(const RenderStyle&
, const RenderBox&, GridTrackSizingDirection); | 48 static PassOwnPtr<GridSpan> resolveGridPositionsFromStyle(const RenderStyle&
, const RenderBox&, GridTrackSizingDirection); |
48 static GridResolvedPosition resolveNamedGridLinePositionFromStyle(const Rend
erStyle&, const GridPosition&, GridPositionSide); | 49 static GridResolvedPosition resolveNamedGridLinePositionFromStyle(const Rend
erStyle&, const GridPosition&, GridPositionSide); |
49 static GridResolvedPosition resolveGridPositionFromStyle(const RenderStyle&,
const GridPosition&, GridPositionSide); | 50 static GridResolvedPosition resolveGridPositionFromStyle(const RenderStyle&,
const GridPosition&, GridPositionSide); |
50 static PassOwnPtr<GridSpan> resolveGridPositionAgainstOppositePosition(const
RenderStyle&, const GridResolvedPosition& resolvedOppositePosition, const GridP
osition&, GridPositionSide); | 51 static PassOwnPtr<GridSpan> resolveGridPositionAgainstOppositePosition(const
RenderStyle&, const GridResolvedPosition& resolvedOppositePosition, const GridP
osition&, GridPositionSide); |
51 static PassOwnPtr<GridSpan> resolveNamedGridLinePositionAgainstOppositePosit
ion(const RenderStyle&, const GridResolvedPosition& resolvedOppositePosition, co
nst GridPosition&, GridPositionSide); | 52 static PassOwnPtr<GridSpan> resolveNamedGridLinePositionAgainstOppositePosit
ion(const RenderStyle&, const GridResolvedPosition& resolvedOppositePosition, co
nst GridPosition&, GridPositionSide); |
52 | 53 |
53 GridResolvedPosition(size_t position) | 54 GridResolvedPosition(size_t position) |
54 : m_integerPosition(position) | 55 : m_integerPosition(position) |
55 { | 56 { |
56 } | 57 } |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 private: | 106 private: |
106 | 107 |
107 static size_t explicitGridSizeForSide(const RenderStyle&, GridPositionSide); | 108 static size_t explicitGridSizeForSide(const RenderStyle&, GridPositionSide); |
108 | 109 |
109 size_t m_integerPosition; | 110 size_t m_integerPosition; |
110 }; | 111 }; |
111 | 112 |
112 } // namespace WebCore | 113 } // namespace WebCore |
113 | 114 |
114 #endif // GridResolvedPosition_h | 115 #endif // GridResolvedPosition_h |
OLD | NEW |