| 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 RenderArena* ref() { ++m_refCount; return renderArena(); } | 72 RenderArena* ref() { ++m_refCount; return renderArena(); } |
| 73 void deref(RenderArena*); | 73 void deref(RenderArena*); |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 RenderWidget(Element*); | 76 RenderWidget(Element*); |
| 77 | 77 |
| 78 FrameView* frameView() const { return m_frameView; } | 78 FrameView* frameView() const { return m_frameView; } |
| 79 | 79 |
| 80 void clearWidget(); | 80 void clearWidget(); |
| 81 | 81 |
| 82 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); | 82 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV
ERRIDE FINAL; |
| 83 virtual void layout(); | 83 virtual void layout(); |
| 84 virtual void paint(PaintInfo&, const LayoutPoint&); | 84 virtual void paint(PaintInfo&, const LayoutPoint&); |
| 85 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; | 85 virtual CursorDirective getCursor(const LayoutPoint&, Cursor&) const; |
| 86 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE; | 86 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE; |
| 87 | 87 |
| 88 virtual void paintContents(PaintInfo&, const LayoutPoint&); | 88 virtual void paintContents(PaintInfo&, const LayoutPoint&); |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 virtual bool isWidget() const { return true; } | 91 virtual bool isWidget() const OVERRIDE FINAL { return true; } |
| 92 | 92 |
| 93 virtual void willBeDestroyed(); | 93 virtual void willBeDestroyed() OVERRIDE FINAL; |
| 94 virtual void destroy(); | 94 virtual void destroy() OVERRIDE FINAL; |
| 95 virtual void setSelectionState(SelectionState); | 95 virtual void setSelectionState(SelectionState) OVERRIDE FINAL; |
| 96 virtual void setOverlapTestResult(bool); | 96 virtual void setOverlapTestResult(bool) OVERRIDE FINAL; |
| 97 | 97 |
| 98 bool setWidgetGeometry(const LayoutRect&); | 98 bool setWidgetGeometry(const LayoutRect&); |
| 99 bool updateWidgetGeometry(); | 99 bool updateWidgetGeometry(); |
| 100 | 100 |
| 101 RefPtr<Widget> m_widget; | 101 RefPtr<Widget> m_widget; |
| 102 FrameView* m_frameView; | 102 FrameView* m_frameView; |
| 103 IntRect m_clipRect; // The rectangle needs to remain correct after scrolling
, so it is stored in content view coordinates, and not clipped to window. | 103 IntRect m_clipRect; // The rectangle needs to remain correct after scrolling
, so it is stored in content view coordinates, and not clipped to window. |
| 104 int m_refCount; | 104 int m_refCount; |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 inline RenderWidget* toRenderWidget(RenderObject* object) | 107 inline RenderWidget* toRenderWidget(RenderObject* object) |
| 108 { | 108 { |
| 109 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isWidget()); | 109 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isWidget()); |
| 110 return static_cast<RenderWidget*>(object); | 110 return static_cast<RenderWidget*>(object); |
| 111 } | 111 } |
| 112 | 112 |
| 113 inline const RenderWidget* toRenderWidget(const RenderObject* object) | 113 inline const RenderWidget* toRenderWidget(const RenderObject* object) |
| 114 { | 114 { |
| 115 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isWidget()); | 115 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isWidget()); |
| 116 return static_cast<const RenderWidget*>(object); | 116 return static_cast<const RenderWidget*>(object); |
| 117 } | 117 } |
| 118 | 118 |
| 119 // This will catch anyone doing an unnecessary cast. | 119 // This will catch anyone doing an unnecessary cast. |
| 120 void toRenderWidget(const RenderWidget*); | 120 void toRenderWidget(const RenderWidget*); |
| 121 | 121 |
| 122 } // namespace WebCore | 122 } // namespace WebCore |
| 123 | 123 |
| 124 #endif // RenderWidget_h | 124 #endif // RenderWidget_h |
| OLD | NEW |