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

Side by Side Diff: Source/core/rendering/RenderRegion.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/RenderQuote.h ('k') | Source/core/rendering/RenderRubyRun.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 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 typedef HashMap<const RenderObject*, ObjectRegionStyleInfo > RenderObjectReg ionStyleMap; 209 typedef HashMap<const RenderObject*, ObjectRegionStyleInfo > RenderObjectReg ionStyleMap;
210 RenderObjectRegionStyleMap m_renderObjectRegionStyle; 210 RenderObjectRegionStyleMap m_renderObjectRegionStyle;
211 211
212 LayoutUnit m_computedAutoHeight; 212 LayoutUnit m_computedAutoHeight;
213 213
214 bool m_isValid : 1; 214 bool m_isValid : 1;
215 bool m_hasCustomRegionStyle : 1; 215 bool m_hasCustomRegionStyle : 1;
216 bool m_hasAutoLogicalHeight : 1; 216 bool m_hasAutoLogicalHeight : 1;
217 }; 217 };
218 218
219 inline RenderRegion* toRenderRegion(RenderObject* object) 219 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderRegion, isRenderRegion());
220 {
221 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderRegion());
222 return static_cast<RenderRegion*>(object);
223 }
224
225 inline const RenderRegion* toRenderRegion(const RenderObject* object)
226 {
227 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderRegion());
228 return static_cast<const RenderRegion*>(object);
229 }
230
231 // This will catch anyone doing an unnecessary cast.
232 void toRenderRegion(const RenderRegion*);
233 220
234 } // namespace WebCore 221 } // namespace WebCore
235 222
236 #endif // RenderRegion_h 223 #endif // RenderRegion_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderQuote.h ('k') | Source/core/rendering/RenderRubyRun.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698