| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 typedef Vector<RenderBox*, 1> GridCell; | 56 typedef Vector<RenderBox*, 1> GridCell; |
| 57 const GridCell& gridCell(int row, int column) { return m_grid[row][column];
} | 57 const GridCell& gridCell(int row, int column) { return m_grid[row][column];
} |
| 58 const Vector<RenderBox*>& itemsOverflowingGridArea() { return m_gridItemsOve
rflowingGridArea; } | 58 const Vector<RenderBox*>& itemsOverflowingGridArea() { return m_gridItemsOve
rflowingGridArea; } |
| 59 int paintIndexForGridItem(const RenderBox* renderBox) { return m_gridItemsIn
dexesMap.get(renderBox); } | 59 int paintIndexForGridItem(const RenderBox* renderBox) { return m_gridItemsIn
dexesMap.get(renderBox); } |
| 60 | 60 |
| 61 bool gridIsDirty() const { return m_gridIsDirty; } | 61 bool gridIsDirty() const { return m_gridIsDirty; } |
| 62 | 62 |
| 63 typedef void (GridTrack::* AccumulatorGrowFunction)(LayoutUnit); | 63 typedef void (GridTrack::* AccumulatorGrowFunction)(LayoutUnit); |
| 64 private: | 64 private: |
| 65 virtual bool isOfType(RenderObjectType type) const override { return type ==
RenderObjectRenderGrid || RenderBlock::isOfType(type); } | 65 virtual bool isOfType(LayoutObjectType type) const override { return type ==
LayoutObjectRenderGrid || RenderBlock::isOfType(type); } |
| 66 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; | 66 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; |
| 67 virtual void computePreferredLogicalWidths() override; | 67 virtual void computePreferredLogicalWidths() override; |
| 68 | 68 |
| 69 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
override; | 69 virtual void addChild(LayoutObject* newChild, LayoutObject* beforeChild = 0)
override; |
| 70 virtual void removeChild(RenderObject*) override; | 70 virtual void removeChild(LayoutObject*) override; |
| 71 | 71 |
| 72 virtual void styleDidChange(StyleDifference, const RenderStyle*) override; | 72 virtual void styleDidChange(StyleDifference, const RenderStyle*) override; |
| 73 | 73 |
| 74 bool explicitGridDidResize(const RenderStyle*) const; | 74 bool explicitGridDidResize(const RenderStyle*) const; |
| 75 bool namedGridLinesDefinitionDidChange(const RenderStyle*) const; | 75 bool namedGridLinesDefinitionDidChange(const RenderStyle*) const; |
| 76 | 76 |
| 77 class GridIterator; | 77 class GridIterator; |
| 78 struct GridSizingData; | 78 struct GridSizingData; |
| 79 bool gridElementIsShrinkToFit(); | 79 bool gridElementIsShrinkToFit(); |
| 80 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData
&); | 80 void computeUsedBreadthOfGridTracks(GridTrackSizingDirection, GridSizingData
&); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 GridRepresentation m_grid; | 164 GridRepresentation m_grid; |
| 165 bool m_gridIsDirty; | 165 bool m_gridIsDirty; |
| 166 Vector<LayoutUnit> m_rowPositions; | 166 Vector<LayoutUnit> m_rowPositions; |
| 167 Vector<LayoutUnit> m_columnPositions; | 167 Vector<LayoutUnit> m_columnPositions; |
| 168 HashMap<const RenderBox*, GridCoordinate> m_gridItemCoordinate; | 168 HashMap<const RenderBox*, GridCoordinate> m_gridItemCoordinate; |
| 169 OrderIterator m_orderIterator; | 169 OrderIterator m_orderIterator; |
| 170 Vector<RenderBox*> m_gridItemsOverflowingGridArea; | 170 Vector<RenderBox*> m_gridItemsOverflowingGridArea; |
| 171 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; | 171 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; |
| 172 }; | 172 }; |
| 173 | 173 |
| 174 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); | 174 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); |
| 175 | 175 |
| 176 } // namespace blink | 176 } // namespace blink |
| 177 | 177 |
| 178 #endif // RenderGrid_h | 178 #endif // RenderGrid_h |
| OLD | NEW |