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

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

Issue 33983003: Introduce DEFINE_RENDER_OBJECT_TYPE_CASTS to replace manual toRenderFoo, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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.h ('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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 typedef Vector<Vector<GridCell> > GridRepresentation; 150 typedef Vector<Vector<GridCell> > GridRepresentation;
151 GridRepresentation m_grid; 151 GridRepresentation m_grid;
152 bool m_gridIsDirty; 152 bool m_gridIsDirty;
153 Vector<LayoutUnit> m_rowPositions; 153 Vector<LayoutUnit> m_rowPositions;
154 Vector<LayoutUnit> m_columnPositions; 154 Vector<LayoutUnit> m_columnPositions;
155 HashMap<const RenderBox*, GridCoordinate> m_gridItemCoordinate; 155 HashMap<const RenderBox*, GridCoordinate> m_gridItemCoordinate;
156 OrderIterator m_orderIterator; 156 OrderIterator m_orderIterator;
157 bool m_gridItemOverflowGridArea; 157 bool m_gridItemOverflowGridArea;
158 }; 158 };
159 159
160 inline RenderGrid* toRenderGrid(RenderObject* object) 160 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderGrid, isRenderGrid());
161 {
162 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderGrid());
163 return static_cast<RenderGrid*>(object);
164 }
165
166 inline const RenderGrid* toRenderGrid(const RenderObject* object)
167 {
168 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderGrid());
169 return static_cast<const RenderGrid*>(object);
170 }
171
172 // Catch unneeded cast.
173 void toRenderGrid(const RenderGrid*);
174 161
175 } // namespace WebCore 162 } // namespace WebCore
176 163
177 #endif // RenderGrid_h 164 #endif // RenderGrid_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFullScreen.h ('k') | Source/core/rendering/RenderHTMLCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698