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

Side by Side Diff: Source/core/rendering/RenderFlexibleBox.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void alignFlexLines(Vector<LineContext>&); 154 void alignFlexLines(Vector<LineContext>&);
155 void alignChildren(const Vector<LineContext>&); 155 void alignChildren(const Vector<LineContext>&);
156 void applyStretchAlignmentToChild(RenderBox*, LayoutUnit lineCrossAxisExtent ); 156 void applyStretchAlignmentToChild(RenderBox*, LayoutUnit lineCrossAxisExtent );
157 void flipForRightToLeftColumn(); 157 void flipForRightToLeftColumn();
158 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar tEdge); 158 void flipForWrapReverse(const Vector<LineContext>&, LayoutUnit crossAxisStar tEdge);
159 159
160 mutable OrderIterator m_orderIterator; 160 mutable OrderIterator m_orderIterator;
161 int m_numberOfInFlowChildrenOnFirstLine; 161 int m_numberOfInFlowChildrenOnFirstLine;
162 }; 162 };
163 163
164 inline RenderFlexibleBox* toRenderFlexibleBox(RenderObject* object) 164 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlexibleBox, isFlexibleBox());
165 {
166 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isFlexibleBox());
167 return static_cast<RenderFlexibleBox*>(object);
168 }
169
170 inline const RenderFlexibleBox* toRenderFlexibleBox(const RenderObject* object)
171 {
172 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isFlexibleBox());
173 return static_cast<const RenderFlexibleBox*>(object);
174 }
175
176 // This will catch anyone doing an unnecessary cast.
177 void toRenderFlexibleBox(const RenderFlexibleBox*);
178 165
179 } // namespace WebCore 166 } // namespace WebCore
180 167
181 #endif // RenderFlexibleBox_h 168 #endif // RenderFlexibleBox_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFileUploadControl.h ('k') | Source/core/rendering/RenderFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698