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

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

Issue 320093002: [CSS Grid Layout] Named grid line span not allowed for automatic positions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@span-named-grid-line-to-upload
Patch Set: Patch for landing Created 6 years, 6 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 , resolvedFinalPosition(resolvedFinalPosition) 107 , resolvedFinalPosition(resolvedFinalPosition)
108 { 108 {
109 ASSERT(resolvedInitialPosition <= resolvedFinalPosition); 109 ASSERT(resolvedInitialPosition <= resolvedFinalPosition);
110 } 110 }
111 111
112 bool operator==(const GridSpan& o) const 112 bool operator==(const GridSpan& o) const
113 { 113 {
114 return resolvedInitialPosition == o.resolvedInitialPosition && resolvedF inalPosition == o.resolvedFinalPosition; 114 return resolvedInitialPosition == o.resolvedInitialPosition && resolvedF inalPosition == o.resolvedFinalPosition;
115 } 115 }
116 116
117 size_t integerSpan() const
118 {
119 return resolvedFinalPosition.toInt() - resolvedInitialPosition.toInt() + 1;
120 }
121
117 GridResolvedPosition resolvedInitialPosition; 122 GridResolvedPosition resolvedInitialPosition;
118 GridResolvedPosition resolvedFinalPosition; 123 GridResolvedPosition resolvedFinalPosition;
119 124
120 typedef GridResolvedPosition iterator; 125 typedef GridResolvedPosition iterator;
121 126
122 iterator begin() const 127 iterator begin() const
123 { 128 {
124 return resolvedInitialPosition; 129 return resolvedInitialPosition;
125 } 130 }
126 131
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 178
174 GridSpan columns; 179 GridSpan columns;
175 GridSpan rows; 180 GridSpan rows;
176 }; 181 };
177 182
178 typedef HashMap<String, GridCoordinate> NamedGridAreaMap; 183 typedef HashMap<String, GridCoordinate> NamedGridAreaMap;
179 184
180 } // namespace WebCore 185 } // namespace WebCore
181 186
182 #endif // GridCoordinate_h 187 #endif // GridCoordinate_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderGrid.cpp ('k') | Source/core/rendering/style/GridResolvedPosition.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698