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

Side by Side Diff: third_party/WebKit/Source/core/style/GridResolvedPosition.h

Issue 1375173002: [css-grid] Unknown named grid lines on absolutely positioned items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments Created 5 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
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/style/GridPosition.h" 8 #include "core/style/GridPosition.h"
9 #include "wtf/Allocator.h" 9 #include "wtf/Allocator.h"
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 static GridResolvedPosition adjustGridPositionForSide(size_t resolvedPositio n, GridPositionSide side) 39 static GridResolvedPosition adjustGridPositionForSide(size_t resolvedPositio n, GridPositionSide side)
40 { 40 {
41 // An item finishing on the N-th line belongs to the N-1-th cell. 41 // An item finishing on the N-th line belongs to the N-1-th cell.
42 if (side == ColumnEndSide || side == RowEndSide) 42 if (side == ColumnEndSide || side == RowEndSide)
43 return adjustGridPositionForAfterEndSide(resolvedPosition); 43 return adjustGridPositionForAfterEndSide(resolvedPosition);
44 44
45 return GridResolvedPosition(resolvedPosition); 45 return GridResolvedPosition(resolvedPosition);
46 } 46 }
47 47
48 static bool isValidNamedLineOrArea(const String& lineName, const ComputedSty le&, GridPositionSide);
49 static GridPositionSide initialPositionSide(GridTrackSizingDirection);
50 static GridPositionSide finalPositionSide(GridTrackSizingDirection);
48 static void initialAndFinalPositionsFromStyle(const ComputedStyle&, const La youtBox&, GridTrackSizingDirection, GridPosition &initialPosition, GridPosition &finalPosition); 51 static void initialAndFinalPositionsFromStyle(const ComputedStyle&, const La youtBox&, GridTrackSizingDirection, GridPosition &initialPosition, GridPosition &finalPosition);
49 static GridSpan resolveGridPositionsFromAutoPlacementPosition(const Computed Style&, const LayoutBox&, GridTrackSizingDirection, const GridResolvedPosition&) ; 52 static GridSpan resolveGridPositionsFromAutoPlacementPosition(const Computed Style&, const LayoutBox&, GridTrackSizingDirection, const GridResolvedPosition&) ;
50 static PassOwnPtr<GridSpan> resolveGridPositionsFromStyle(const ComputedStyl e&, const LayoutBox&, GridTrackSizingDirection); 53 static PassOwnPtr<GridSpan> resolveGridPositionsFromStyle(const ComputedStyl e&, const LayoutBox&, GridTrackSizingDirection);
51 static GridResolvedPosition resolveNamedGridLinePositionFromStyle(const Comp utedStyle&, const GridPosition&, GridPositionSide); 54 static GridResolvedPosition resolveNamedGridLinePositionFromStyle(const Comp utedStyle&, const GridPosition&, GridPositionSide);
52 static GridResolvedPosition resolveGridPositionFromStyle(const ComputedStyle &, const GridPosition&, GridPositionSide); 55 static GridResolvedPosition resolveGridPositionFromStyle(const ComputedStyle &, const GridPosition&, GridPositionSide);
53 static PassOwnPtr<GridSpan> resolveGridPositionAgainstOppositePosition(const ComputedStyle&, const GridResolvedPosition& resolvedOppositePosition, const Gri dPosition&, GridPositionSide); 56 static PassOwnPtr<GridSpan> resolveGridPositionAgainstOppositePosition(const ComputedStyle&, const GridResolvedPosition& resolvedOppositePosition, const Gri dPosition&, GridPositionSide);
54 static PassOwnPtr<GridSpan> resolveNamedGridLinePositionAgainstOppositePosit ion(const ComputedStyle&, const GridResolvedPosition& resolvedOppositePosition, const GridPosition&, GridPositionSide); 57 static PassOwnPtr<GridSpan> resolveNamedGridLinePositionAgainstOppositePosit ion(const ComputedStyle&, const GridResolvedPosition& resolvedOppositePosition, const GridPosition&, GridPositionSide);
55 58
56 GridResolvedPosition(size_t position) 59 GridResolvedPosition(size_t position)
57 : m_integerPosition(position) 60 : m_integerPosition(position)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 private: 126 private:
124 127
125 static size_t explicitGridSizeForSide(const ComputedStyle&, GridPositionSide ); 128 static size_t explicitGridSizeForSide(const ComputedStyle&, GridPositionSide );
126 129
127 size_t m_integerPosition; 130 size_t m_integerPosition;
128 }; 131 };
129 132
130 } // namespace blink 133 } // namespace blink
131 134
132 #endif // GridResolvedPosition_h 135 #endif // GridResolvedPosition_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutGrid.cpp ('k') | third_party/WebKit/Source/core/style/GridResolvedPosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698