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

Side by Side Diff: third_party/WebKit/Source/core/layout/Grid.cpp

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 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 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "core/layout/Grid.h" 5 #include "core/layout/Grid.h"
6 6
7 #include "core/layout/LayoutGrid.h" 7 #include "core/layout/LayoutGrid.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 m_smallestRowStart = rowStart; 47 m_smallestRowStart = rowStart;
48 m_smallestColumnStart = columnStart; 48 m_smallestColumnStart = columnStart;
49 } 49 }
50 50
51 int Grid::smallestTrackStart(GridTrackSizingDirection direction) const { 51 int Grid::smallestTrackStart(GridTrackSizingDirection direction) const {
52 return direction == ForRows ? m_smallestRowStart : m_smallestColumnStart; 52 return direction == ForRows ? m_smallestRowStart : m_smallestColumnStart;
53 } 53 }
54 54
55 GridArea Grid::gridItemArea(const LayoutBox& item) const { 55 GridArea Grid::gridItemArea(const LayoutBox& item) const {
56 DCHECK(m_gridItemArea.contains(&item)); 56 DCHECK(m_gridItemArea.contains(&item));
57 return m_gridItemArea.get(&item); 57 return m_gridItemArea.at(&item);
58 } 58 }
59 59
60 void Grid::setGridItemArea(const LayoutBox& item, GridArea area) { 60 void Grid::setGridItemArea(const LayoutBox& item, GridArea area) {
61 m_gridItemArea.set(&item, area); 61 m_gridItemArea.set(&item, area);
62 } 62 }
63 63
64 size_t Grid::gridItemPaintOrder(const LayoutBox& item) const { 64 size_t Grid::gridItemPaintOrder(const LayoutBox& item) const {
65 return m_gridItemsIndexesMap.get(&item); 65 return m_gridItemsIndexesMap.at(&item);
66 } 66 }
67 67
68 void Grid::setGridItemPaintOrder(const LayoutBox& item, size_t order) { 68 void Grid::setGridItemPaintOrder(const LayoutBox& item, size_t order) {
69 m_gridItemsIndexesMap.set(&item, order); 69 m_gridItemsIndexesMap.set(&item, order);
70 } 70 }
71 71
72 const GridCell& Grid::cell(size_t row, size_t column) const { 72 const GridCell& Grid::cell(size_t row, size_t column) const {
73 return m_grid[row][column]; 73 return m_grid[row][column];
74 } 74 }
75 75
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 // Advance the iterator to avoid an infinite loop where we would return 233 // Advance the iterator to avoid an infinite loop where we would return
234 // the same grid area over and over. 234 // the same grid area over and over.
235 ++varyingTrackIndex; 235 ++varyingTrackIndex;
236 return result; 236 return result;
237 } 237 }
238 } 238 }
239 return nullptr; 239 return nullptr;
240 } 240 }
241 241
242 } // namespace blink 242 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698