Chromium Code Reviews| Index: Source/core/platform/Widget.h |
| diff --git a/Source/core/platform/Widget.h b/Source/core/platform/Widget.h |
| index 73f2ea22789bc6b470b71e04cd458433e257e452..47d3d61d80617aeb59998006a1245c8b41762906 100644 |
| --- a/Source/core/platform/Widget.h |
| +++ b/Source/core/platform/Widget.h |
| @@ -34,19 +34,19 @@ |
| namespace WebCore { |
| -class AXObjectCache; |
| class Cursor; |
| class Event; |
| class GraphicsContext; |
| -class ScrollView; |
| +class HostWindow; |
| // The Widget class serves as a base class for three kinds of objects: |
| // (1) Scrollable areas (ScrollView) |
| // (2) Scrollbars (Scrollbar) |
| // (3) Plugins (PluginView) |
| // |
| -// Widgets are connected in a hierarchy, with the restriction that plugins and scrollbars are always leaves of the |
| -// tree. Only ScrollViews can have children (and therefore the Widget class has no concept of children). |
| +// Widgets are connected in a hierarchy, with the restriction that plugins and |
| +// scrollbars are always leaves of the tree. Only Widgets can have children |
|
eseidel
2013/10/11 15:27:22
"Only ScrollViews can have children" rather...
|
| +// (and therefore the Widget class has no concept of children). |
| class Widget : public RefCounted<Widget> { |
| public: |
| Widget(); |
| @@ -90,10 +90,10 @@ public: |
| virtual bool isScrollbar() const { return false; } |
| virtual bool isScrollView() const { return false; } |
| - void removeFromParent(); |
| - virtual void setParent(ScrollView* view); |
| - ScrollView* parent() const { return m_parent; } |
| - ScrollView* root() const; |
| + virtual HostWindow* hostWindow() const; |
| + virtual void setParent(Widget*); |
| + Widget* parent() const { return m_parent; } |
|
eseidel
2013/10/11 15:27:22
Making these SrollView* is fine. It just means th
|
| + Widget* root() const; |
| virtual void handleEvent(Event*) { } |
| @@ -121,20 +121,21 @@ public: |
| // Notifies this widget that its clip rect changed. |
| virtual void clipRectChanged() { } |
| - // Virtual methods to convert points to/from the containing ScrollView |
| + // Virtual methods to convert points to/from the containing Widget |
| virtual IntRect convertToContainingView(const IntRect&) const; |
|
eseidel
2013/10/11 15:27:22
If ScrollView is always the container, why use Wid
|
| virtual IntRect convertFromContainingView(const IntRect&) const; |
| virtual IntPoint convertToContainingView(const IntPoint&) const; |
| virtual IntPoint convertFromContainingView(const IntPoint&) const; |
| - // A means to access the AX cache when this object can get a pointer to it. |
| - virtual AXObjectCache* axObjectCache() const { return 0; } |
| + // Virtual methods to convert points to/from child widgets |
| + virtual IntPoint convertChildToSelf(const Widget*, const IntPoint&) const; |
| + virtual IntPoint convertSelfToChild(const Widget*, const IntPoint&) const; |
| // Notifies this widget that it will no longer be receiving events. |
| virtual void eventListenersRemoved() { } |
| private: |
| - ScrollView* m_parent; |
| + Widget* m_parent; |
| IntRect m_frame; |
| bool m_selfVisible; |
| bool m_parentVisible; |