| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 const Vector<LayoutUnit>& rowPositions() const { return m_rowPositions; } | 54 const Vector<LayoutUnit>& rowPositions() const { return m_rowPositions; } |
| 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 private: | 63 private: |
| 64 virtual bool isRenderGrid() const override { return true; } | 64 virtual bool isOfType(RenderObjectType type) const override { return type ==
RenderObjectRenderGrid || RenderBlock::isOfType(type); } |
| 65 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; | 65 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo
utUnit& maxLogicalWidth) const override; |
| 66 virtual void computePreferredLogicalWidths() override; | 66 virtual void computePreferredLogicalWidths() override; |
| 67 | 67 |
| 68 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
override; | 68 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0)
override; |
| 69 void addChildToIndexesMap(RenderBox&); | 69 void addChildToIndexesMap(RenderBox&); |
| 70 virtual void removeChild(RenderObject*) override; | 70 virtual void removeChild(RenderObject*) 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; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 OrderIterator m_orderIterator; | 155 OrderIterator m_orderIterator; |
| 156 Vector<RenderBox*> m_gridItemsOverflowingGridArea; | 156 Vector<RenderBox*> m_gridItemsOverflowingGridArea; |
| 157 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; | 157 HashMap<const RenderBox*, size_t> m_gridItemsIndexesMap; |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); | 160 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid()); |
| 161 | 161 |
| 162 } // namespace blink | 162 } // namespace blink |
| 163 | 163 |
| 164 #endif // RenderGrid_h | 164 #endif // RenderGrid_h |
| OLD | NEW |