| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 return m_columnPositions; | 67 return m_columnPositions; |
| 68 } | 68 } |
| 69 | 69 |
| 70 const Vector<LayoutUnit>& rowPositions() const { | 70 const Vector<LayoutUnit>& rowPositions() const { |
| 71 ASSERT(!m_gridIsDirty); | 71 ASSERT(!m_gridIsDirty); |
| 72 return m_rowPositions; | 72 return m_rowPositions; |
| 73 } | 73 } |
| 74 | 74 |
| 75 typedef Vector<LayoutBox*, 1> GridCell; | 75 typedef Vector<LayoutBox*, 1> GridCell; |
| 76 const GridCell& gridCell(int row, int column) const { | 76 const GridCell& gridCell(int row, int column) const { |
| 77 ASSERT_WITH_SECURITY_IMPLICATION(!m_gridIsDirty); | 77 SECURITY_DCHECK(!m_gridIsDirty); |
| 78 return m_grid[row][column]; | 78 return m_grid[row][column]; |
| 79 } | 79 } |
| 80 | 80 |
| 81 const Vector<LayoutBox*>& itemsOverflowingGridArea() const { | 81 const Vector<LayoutBox*>& itemsOverflowingGridArea() const { |
| 82 ASSERT_WITH_SECURITY_IMPLICATION(!m_gridIsDirty); | 82 SECURITY_DCHECK(!m_gridIsDirty); |
| 83 return m_gridItemsOverflowingGridArea; | 83 return m_gridItemsOverflowingGridArea; |
| 84 } | 84 } |
| 85 | 85 |
| 86 int paintIndexForGridItem(const LayoutBox* layoutBox) const { | 86 int paintIndexForGridItem(const LayoutBox* layoutBox) const { |
| 87 ASSERT_WITH_SECURITY_IMPLICATION(!m_gridIsDirty); | 87 SECURITY_DCHECK(!m_gridIsDirty); |
| 88 return m_gridItemsIndexesMap.get(layoutBox); | 88 return m_gridItemsIndexesMap.get(layoutBox); |
| 89 } | 89 } |
| 90 | 90 |
| 91 size_t autoRepeatCountForDirection(GridTrackSizingDirection direction) const { | 91 size_t autoRepeatCountForDirection(GridTrackSizingDirection direction) const { |
| 92 return direction == ForColumns ? m_autoRepeatColumns : m_autoRepeatRows; | 92 return direction == ForColumns ? m_autoRepeatColumns : m_autoRepeatRows; |
| 93 } | 93 } |
| 94 | 94 |
| 95 LayoutUnit translateRTLCoordinate(LayoutUnit) const; | 95 LayoutUnit translateRTLCoordinate(LayoutUnit) const; |
| 96 | 96 |
| 97 private: | 97 private: |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr}; | 355 std::unique_ptr<OrderedTrackIndexSet> m_autoRepeatEmptyRows{nullptr}; |
| 356 | 356 |
| 357 Optional<bool> m_hasDefiniteLogicalHeight; | 357 Optional<bool> m_hasDefiniteLogicalHeight; |
| 358 }; | 358 }; |
| 359 | 359 |
| 360 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 360 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
| 361 | 361 |
| 362 } // namespace blink | 362 } // namespace blink |
| 363 | 363 |
| 364 #endif // LayoutGrid_h | 364 #endif // LayoutGrid_h |
| OLD | NEW |