OLD | NEW |
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 bool m_dispatchRegionOversetChangeEvent : 1; | 284 bool m_dispatchRegionOversetChangeEvent : 1; |
285 bool m_pageLogicalSizeChanged : 1; | 285 bool m_pageLogicalSizeChanged : 1; |
286 bool m_inConstrainedLayoutPhase : 1; | 286 bool m_inConstrainedLayoutPhase : 1; |
287 bool m_needsTwoPhasesLayout : 1; | 287 bool m_needsTwoPhasesLayout : 1; |
288 | 288 |
289 private: | 289 private: |
290 virtual bool supportsPartialLayout() const OVERRIDE { return false; } | 290 virtual bool supportsPartialLayout() const OVERRIDE { return false; } |
291 | 291 |
292 }; | 292 }; |
293 | 293 |
294 inline RenderFlowThread* toRenderFlowThread(RenderObject* object) | 294 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlowThread, isRenderFlowThread()); |
295 { | |
296 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderFlowThread()); | |
297 return static_cast<RenderFlowThread*>(object); | |
298 } | |
299 | |
300 inline const RenderFlowThread* toRenderFlowThread(const RenderObject* object) | |
301 { | |
302 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderFlowThread()); | |
303 return static_cast<const RenderFlowThread*>(object); | |
304 } | |
305 | |
306 // This will catch anyone doing an unnecessary cast. | |
307 void toRenderFlowThread(const RenderFlowThread*); | |
308 | 295 |
309 class CurrentRenderFlowThreadMaintainer { | 296 class CurrentRenderFlowThreadMaintainer { |
310 WTF_MAKE_NONCOPYABLE(CurrentRenderFlowThreadMaintainer); | 297 WTF_MAKE_NONCOPYABLE(CurrentRenderFlowThreadMaintainer); |
311 public: | 298 public: |
312 CurrentRenderFlowThreadMaintainer(RenderFlowThread*); | 299 CurrentRenderFlowThreadMaintainer(RenderFlowThread*); |
313 ~CurrentRenderFlowThreadMaintainer(); | 300 ~CurrentRenderFlowThreadMaintainer(); |
314 private: | 301 private: |
315 RenderFlowThread* m_renderFlowThread; | 302 RenderFlowThread* m_renderFlowThread; |
316 RenderFlowThread* m_previousRenderFlowThread; | 303 RenderFlowThread* m_previousRenderFlowThread; |
317 }; | 304 }; |
318 | 305 |
319 // These structures are used by PODIntervalTree for debugging. | 306 // These structures are used by PODIntervalTree for debugging. |
320 #ifndef NDEBUG | 307 #ifndef NDEBUG |
321 template <> struct ValueToString<LayoutUnit> { | 308 template <> struct ValueToString<LayoutUnit> { |
322 static String string(const LayoutUnit value) { return String::number(value.t
oFloat()); } | 309 static String string(const LayoutUnit value) { return String::number(value.t
oFloat()); } |
323 }; | 310 }; |
324 | 311 |
325 template <> struct ValueToString<RenderRegion*> { | 312 template <> struct ValueToString<RenderRegion*> { |
326 static String string(const RenderRegion* value) { return String::format("%p"
, value); } | 313 static String string(const RenderRegion* value) { return String::format("%p"
, value); } |
327 }; | 314 }; |
328 #endif | 315 #endif |
329 | 316 |
330 } // namespace WebCore | 317 } // namespace WebCore |
331 | 318 |
332 #endif // RenderFlowThread_h | 319 #endif // RenderFlowThread_h |
OLD | NEW |