From 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 Mon Sep 17 00:00:00 2001 From: Ben Murdoch Date: Tue, 11 Aug 2009 17:01:47 +0100 Subject: Merge in WebKit r47029. --- WebCore/rendering/RenderMenuList.h | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'WebCore/rendering/RenderMenuList.h') 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(object); +} + +// This will catch anyone doing an unnecessary cast. +void toRenderMenuList(const RenderMenuList*); + } #endif -- cgit v1.1