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

Side by Side Diff: Source/core/rendering/RenderGrid.h

Issue 613783002: Smaller vtbls in RenderObject (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase better. Created 6 years, 2 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
« no previous file with comments | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderHTMLCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderHTMLCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698