diff options
author | Ben Murdoch <benm@google.com> | 2009-08-11 17:01:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-11 18:21:02 +0100 |
commit | 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch) | |
tree | 2943df35f62d885c89d01063cc528dd73b480fea /WebCore/rendering/RenderMenuList.h | |
parent | 7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff) | |
download | external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2 |
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/rendering/RenderMenuList.h')
-rw-r--r-- | WebCore/rendering/RenderMenuList.h | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/WebCore/rendering/RenderMenuList.h b/WebCore/rendering/RenderMenuList.h index 7966eff..5c18e9e 100644 --- a/WebCore/rendering/RenderMenuList.h +++ b/WebCore/rendering/RenderMenuList.h @@ -40,7 +40,16 @@ class RenderText; class RenderMenuList : public RenderFlexibleBox, private PopupMenuClient { public: RenderMenuList(Element*); - ~RenderMenuList(); + virtual ~RenderMenuList(); + +public: + bool popupIsVisible() const { return m_popupIsVisible; } + void showPopup(); + void hidePopup(); + + void setOptionsChanged(bool changed) { m_optionsChanged = changed; } + + String text() const; private: virtual bool isMenuList() const { return true; } @@ -59,20 +68,11 @@ private: virtual void calcPrefWidths(); -public: - bool popupIsVisible() const { return m_popupIsVisible; } - void showPopup(); - void hidePopup(); - - void setOptionsChanged(bool changed) { m_optionsChanged = changed; } - - String text() const; - -private: virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); // PopupMenuClient methods virtual String itemText(unsigned listIndex) const; + virtual String itemToolTip(unsigned listIndex) const; virtual bool itemIsEnabled(unsigned listIndex) const; virtual PopupMenuStyle itemStyle(unsigned listIndex) const; virtual PopupMenuStyle menuStyle() const; @@ -113,6 +113,15 @@ private: bool m_popupIsVisible; }; +inline RenderMenuList* toRenderMenuList(RenderObject* object) +{ + ASSERT(!object || object->isMenuList()); + return static_cast<RenderMenuList*>(object); +} + +// This will catch anyone doing an unnecessary cast. +void toRenderMenuList(const RenderMenuList*); + } #endif |