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

Side by Side Diff: Source/core/rendering/RenderWidget.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/RenderView.h ('k') | Source/core/rendering/svg/RenderSVGContainer.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) 2004, 2005, 2006, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2009, 2010 Apple Inc. All rights reserved.
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 bool setWidgetGeometry(const LayoutRect&); 73 bool setWidgetGeometry(const LayoutRect&);
74 bool updateWidgetGeometry(); 74 bool updateWidgetGeometry();
75 75
76 RefPtr<Widget> m_widget; 76 RefPtr<Widget> m_widget;
77 FrameView* m_frameView; 77 FrameView* m_frameView;
78 IntRect m_clipRect; // The rectangle needs to remain correct after scrolling , so it is stored in content view coordinates, and not clipped to window. 78 IntRect m_clipRect; // The rectangle needs to remain correct after scrolling , so it is stored in content view coordinates, and not clipped to window.
79 int m_refCount; 79 int m_refCount;
80 }; 80 };
81 81
82 inline RenderWidget* toRenderWidget(RenderObject* object) 82 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderWidget, isWidget());
83 {
84 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isWidget());
85 return static_cast<RenderWidget*>(object);
86 }
87
88 inline const RenderWidget* toRenderWidget(const RenderObject* object)
89 {
90 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isWidget());
91 return static_cast<const RenderWidget*>(object);
92 }
93
94 // This will catch anyone doing an unnecessary cast.
95 void toRenderWidget(const RenderWidget*);
96 83
97 } // namespace WebCore 84 } // namespace WebCore
98 85
99 #endif // RenderWidget_h 86 #endif // RenderWidget_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/core/rendering/svg/RenderSVGContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698