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

Side by Side Diff: Source/core/rendering/style/GridCoordinate.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: Add comment in areCellsEmpty() method Created 6 years, 9 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 , finalPositionIndex(finalPosition) 107 , finalPositionIndex(finalPosition)
108 { 108 {
109 ASSERT(initialPositionIndex <= finalPositionIndex); 109 ASSERT(initialPositionIndex <= finalPositionIndex);
110 } 110 }
111 111
112 bool operator==(const GridSpan& o) const 112 bool operator==(const GridSpan& o) const
113 { 113 {
114 return initialPositionIndex == o.initialPositionIndex && finalPositionIn dex == o.finalPositionIndex; 114 return initialPositionIndex == o.initialPositionIndex && finalPositionIn dex == o.finalPositionIndex;
115 } 115 }
116 116
117 size_t spanningPositions() const
Julien - ping for review 2014/04/04 00:10:16 This name is also confusing for me. I would rather
118 {
119 return finalPositionIndex - initialPositionIndex + 1;
120 }
121
117 size_t initialPositionIndex; 122 size_t initialPositionIndex;
118 size_t finalPositionIndex; 123 size_t finalPositionIndex;
119 }; 124 };
120 125
121 // This represents a grid area that spans in both rows' and columns' direction. 126 // This represents a grid area that spans in both rows' and columns' direction.
122 struct GridCoordinate { 127 struct GridCoordinate {
123 // HashMap requires a default constuctor. 128 // HashMap requires a default constuctor.
124 GridCoordinate() 129 GridCoordinate()
125 : columns(0, 0) 130 : columns(0, 0)
126 , rows(0, 0) 131 , rows(0, 0)
(...skipping 18 matching lines...) Expand all
145 150
146 GridSpan columns; 151 GridSpan columns;
147 GridSpan rows; 152 GridSpan rows;
148 }; 153 };
149 154
150 typedef HashMap<String, GridCoordinate> NamedGridAreaMap; 155 typedef HashMap<String, GridCoordinate> NamedGridAreaMap;
151 156
152 } // namespace WebCore 157 } // namespace WebCore
153 158
154 #endif // GridCoordinate_h 159 #endif // GridCoordinate_h
OLDNEW
« Source/core/rendering/RenderGrid.cpp ('K') | « Source/core/rendering/RenderGrid.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698