| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |