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

Side by Side Diff: Source/core/rendering/RenderMultiColumnSet.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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 // The following variables are used when balancing the column set. 146 // The following variables are used when balancing the column set.
147 LayoutUnit m_maxColumnHeight; // Maximum column height allowed. 147 LayoutUnit m_maxColumnHeight; // Maximum column height allowed.
148 LayoutUnit m_minSpaceShortage; // The smallest amout of space shortage that caused a column break. 148 LayoutUnit m_minSpaceShortage; // The smallest amout of space shortage that caused a column break.
149 LayoutUnit m_minimumColumnHeight; 149 LayoutUnit m_minimumColumnHeight;
150 unsigned m_forcedBreaksCount; // FIXME: We will ultimately need to cache mor e information to balance around forced breaks properly. 150 unsigned m_forcedBreaksCount; // FIXME: We will ultimately need to cache mor e information to balance around forced breaks properly.
151 LayoutUnit m_maximumDistanceBetweenForcedBreaks; 151 LayoutUnit m_maximumDistanceBetweenForcedBreaks;
152 LayoutUnit m_forcedBreakOffset; 152 LayoutUnit m_forcedBreakOffset;
153 }; 153 };
154 154
155 inline RenderMultiColumnSet* toRenderMultiColumnSet(RenderObject* object) 155 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSet, isRenderMultiColumnSet());
156 {
157 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderMultiColumnSet() );
158 return static_cast<RenderMultiColumnSet*>(object);
159 }
160
161 inline const RenderMultiColumnSet* toRenderMultiColumnSet(const RenderObject* ob ject)
162 {
163 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderMultiColumnSet() );
164 return static_cast<const RenderMultiColumnSet*>(object);
165 }
166
167 // This will catch anyone doing an unnecessary cast.
168 void toRenderMultiColumnSet(const RenderMultiColumnSet*);
169 156
170 } // namespace WebCore 157 } // namespace WebCore
171 158
172 #endif // RenderMultiColumnSet_h 159 #endif // RenderMultiColumnSet_h
173 160
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMultiColumnBlock.h ('k') | Source/core/rendering/RenderNamedFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698