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

Side by Side Diff: Source/core/rendering/RenderView.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/RenderVideo.h ('k') | Source/core/rendering/RenderWidget.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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 unsigned m_layoutStateDisableCount; 302 unsigned m_layoutStateDisableCount;
303 OwnPtr<RenderLayerCompositor> m_compositor; 303 OwnPtr<RenderLayerCompositor> m_compositor;
304 OwnPtr<CustomFilterGlobalContext> m_customFilterGlobalContext; 304 OwnPtr<CustomFilterGlobalContext> m_customFilterGlobalContext;
305 OwnPtr<FlowThreadController> m_flowThreadController; 305 OwnPtr<FlowThreadController> m_flowThreadController;
306 RefPtr<IntervalArena> m_intervalArena; 306 RefPtr<IntervalArena> m_intervalArena;
307 307
308 RenderQuote* m_renderQuoteHead; 308 RenderQuote* m_renderQuoteHead;
309 unsigned m_renderCounterCount; 309 unsigned m_renderCounterCount;
310 }; 310 };
311 311
312 inline RenderView* toRenderView(RenderObject* object) 312 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderView, isRenderView());
313 {
314 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderView());
315 return static_cast<RenderView*>(object);
316 }
317
318 inline const RenderView* toRenderView(const RenderObject* object)
319 {
320 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderView());
321 return static_cast<const RenderView*>(object);
322 }
323
324 // This will catch anyone doing an unnecessary cast.
325 void toRenderView(const RenderView*);
326 313
327 // Stack-based class to assist with LayoutState push/pop 314 // Stack-based class to assist with LayoutState push/pop
328 class LayoutStateMaintainer { 315 class LayoutStateMaintainer {
329 WTF_MAKE_NONCOPYABLE(LayoutStateMaintainer); 316 WTF_MAKE_NONCOPYABLE(LayoutStateMaintainer);
330 public: 317 public:
331 // ctor to push now 318 // ctor to push now
332 LayoutStateMaintainer(RenderView* view, RenderBox* root, LayoutSize offset, bool disableState = false, LayoutUnit pageHeight = 0, bool pageHeightChanged = f alse, ColumnInfo* colInfo = 0) 319 LayoutStateMaintainer(RenderView* view, RenderBox* root, LayoutSize offset, bool disableState = false, LayoutUnit pageHeight = 0, bool pageHeightChanged = f alse, ColumnInfo* colInfo = 0)
333 : m_view(view) 320 : m_view(view)
334 , m_disabled(disableState) 321 , m_disabled(disableState)
335 , m_didStart(false) 322 , m_didStart(false)
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 RenderObject::FlowThreadState m_flowThreadState; 404 RenderObject::FlowThreadState m_flowThreadState;
418 bool m_fragmenting; 405 bool m_fragmenting;
419 #ifndef NDEBUG 406 #ifndef NDEBUG
420 LayoutState* m_layoutState; 407 LayoutState* m_layoutState;
421 #endif 408 #endif
422 }; 409 };
423 410
424 } // namespace WebCore 411 } // namespace WebCore
425 412
426 #endif // RenderView_h 413 #endif // RenderView_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderVideo.h ('k') | Source/core/rendering/RenderWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698