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

Side by Side Diff: Source/core/rendering/style/GridResolvedPosition.h

Issue 196943026: [CSS Grid Layout] Support span in auto-placement algorithm (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: New rebased version including review comments 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 // 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
36 36
37 static GridResolvedPosition adjustGridPositionForSide(size_t resolvedPositio n, GridPositionSide side) 37 static GridResolvedPosition adjustGridPositionForSide(size_t resolvedPositio n, GridPositionSide 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 GridResolvedPosition(resolvedPosition); 43 return GridResolvedPosition(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, const GridPosit ionSide initialPositionSide, GridPosition &finalPosition, const GridPositionSide finalPositionSide);
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 private: 116 private:
116 117
117 static size_t explicitGridSizeForSide(const RenderStyle&, GridPositionSide); 118 static size_t explicitGridSizeForSide(const RenderStyle&, GridPositionSide);
118 119
119 size_t m_integerPosition; 120 size_t m_integerPosition;
120 }; 121 };
121 122
122 } // namespace WebCore 123 } // namespace WebCore
123 124
124 #endif // GridResolvedPosition_h 125 #endif // GridResolvedPosition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698