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 } | 67 } |
68 | 68 |
69 const Vector<LayoutUnit>& rowPositions() const | 69 const Vector<LayoutUnit>& rowPositions() const |
70 { | 70 { |
71 ASSERT(!m_gridIsDirty); | 71 ASSERT(!m_gridIsDirty); |
72 return m_rowPositions; | 72 return m_rowPositions; |
73 } | 73 } |
74 | 74 |
75 LayoutUnit guttersSize(GridTrackSizingDirection, size_t span) const; | 75 LayoutUnit guttersSize(GridTrackSizingDirection, size_t span) const; |
76 | 76 |
| 77 LayoutUnit offsetBetweenTracks(GridTrackSizingDirection direction) const |
| 78 { |
| 79 return direction == ForColumns ? m_offsetBetweenColumns : m_offsetBetwee
nRows; |
| 80 } |
| 81 |
77 typedef Vector<LayoutBox*, 1> GridCell; | 82 typedef Vector<LayoutBox*, 1> GridCell; |
78 const GridCell& gridCell(int row, int column) const | 83 const GridCell& gridCell(int row, int column) const |
79 { | 84 { |
80 ASSERT_WITH_SECURITY_IMPLICATION(!m_gridIsDirty); | 85 ASSERT_WITH_SECURITY_IMPLICATION(!m_gridIsDirty); |
81 return m_grid[row][column]; | 86 return m_grid[row][column]; |
82 } | 87 } |
83 | 88 |
84 const Vector<LayoutBox*>& itemsOverflowingGridArea() const | 89 const Vector<LayoutBox*>& itemsOverflowingGridArea() const |
85 { | 90 { |
86 ASSERT_WITH_SECURITY_IMPLICATION(!m_gridIsDirty); | 91 ASSERT_WITH_SECURITY_IMPLICATION(!m_gridIsDirty); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 236 |
232 size_t m_autoRepeatColumns { 0 }; | 237 size_t m_autoRepeatColumns { 0 }; |
233 size_t m_autoRepeatRows { 0 }; | 238 size_t m_autoRepeatRows { 0 }; |
234 }; | 239 }; |
235 | 240 |
236 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); | 241 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutGrid, isLayoutGrid()); |
237 | 242 |
238 } // namespace blink | 243 } // namespace blink |
239 | 244 |
240 #endif // LayoutGrid_h | 245 #endif // LayoutGrid_h |
OLD | NEW |