Skip to content
Permalink
Browse files
Use OVERRIDE for PopupMenuClient's implementations
https://bugs.webkit.org/show_bug.cgi?id=76774

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-01-23
Reviewed by Darin Adler.

* rendering/RenderMenuList.h: Also sort the methods to the same
order as PopupMenuClient.
* rendering/RenderTextControlSingleLine.h:


Canonical link: https://commits.webkit.org/93671@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Benjamin Poulain authored and BenjaminPoulain committed Jan 23, 2012
1 parent 9873bdc commit 3011237800ccd19b7fe1482fe448cb13fede7670
Showing 3 changed files with 67 additions and 57 deletions.
@@ -1,3 +1,14 @@
2012-01-23 Benjamin Poulain <bpoulain@apple.com>

Use OVERRIDE for PopupMenuClient's implementations
https://bugs.webkit.org/show_bug.cgi?id=76774

Reviewed by Darin Adler.

* rendering/RenderMenuList.h: Also sort the methods to the same
order as PopupMenuClient.
* rendering/RenderTextControlSingleLine.h:

2012-01-23 Xianzhu Wang <wangxianzhu@chromium.org>

Basic enhancements to StringBuilder
@@ -78,36 +78,35 @@ class RenderMenuList : public RenderDeprecatedFlexibleBox, private PopupMenuClie
virtual bool requiresForcedStyleRecalcPropagation() const { return true; }

// PopupMenuClient methods
virtual String itemText(unsigned listIndex) const;
virtual String itemLabel(unsigned listIndex) const;
virtual String itemIcon(unsigned listIndex) const;
virtual String itemToolTip(unsigned listIndex) const;
virtual String itemAccessibilityText(unsigned listIndex) const;
virtual bool itemIsEnabled(unsigned listIndex) const;
virtual PopupMenuStyle itemStyle(unsigned listIndex) const;
virtual PopupMenuStyle menuStyle() const;
virtual int clientInsetLeft() const;
virtual int clientInsetRight() const;
virtual int clientPaddingLeft() const;
virtual int clientPaddingRight() const;
virtual int listSize() const;
virtual int selectedIndex() const;
virtual void popupDidHide();
virtual bool itemIsSeparator(unsigned listIndex) const;
virtual bool itemIsLabel(unsigned listIndex) const;
virtual bool itemIsSelected(unsigned listIndex) const;
virtual void setTextFromItem(unsigned listIndex);
virtual bool valueShouldChangeOnHotTrack() const { return true; }
virtual bool shouldPopOver() const { return !POPUP_MENU_PULLS_DOWN; }
virtual void valueChanged(unsigned listIndex, bool fireOnChange = true);
virtual void selectionChanged(unsigned, bool) {}
virtual void selectionCleared() {}
virtual FontSelector* fontSelector() const;
virtual HostWindow* hostWindow() const;
virtual PassRefPtr<Scrollbar> createScrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize);

virtual void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true);
virtual bool multiple() const;
virtual void valueChanged(unsigned listIndex, bool fireOnChange = true) OVERRIDE;
virtual void selectionChanged(unsigned, bool) OVERRIDE { }
virtual void selectionCleared() OVERRIDE { }
virtual String itemText(unsigned listIndex) const OVERRIDE;
virtual String itemLabel(unsigned listIndex) const OVERRIDE;
virtual String itemIcon(unsigned listIndex) const OVERRIDE;
virtual String itemToolTip(unsigned listIndex) const OVERRIDE;
virtual String itemAccessibilityText(unsigned listIndex) const OVERRIDE;
virtual bool itemIsEnabled(unsigned listIndex) const OVERRIDE;
virtual PopupMenuStyle itemStyle(unsigned listIndex) const OVERRIDE;
virtual PopupMenuStyle menuStyle() const OVERRIDE;
virtual int clientInsetLeft() const OVERRIDE;
virtual int clientInsetRight() const OVERRIDE;
virtual int clientPaddingLeft() const OVERRIDE;
virtual int clientPaddingRight() const OVERRIDE;
virtual int listSize() const OVERRIDE;
virtual int selectedIndex() const OVERRIDE;
virtual void popupDidHide() OVERRIDE;
virtual bool itemIsSeparator(unsigned listIndex) const OVERRIDE;
virtual bool itemIsLabel(unsigned listIndex) const OVERRIDE;
virtual bool itemIsSelected(unsigned listIndex) const OVERRIDE;
virtual bool shouldPopOver() const OVERRIDE { return !POPUP_MENU_PULLS_DOWN; }
virtual bool valueShouldChangeOnHotTrack() const OVERRIDE { return true; }
virtual void setTextFromItem(unsigned listIndex) OVERRIDE;
virtual void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true) OVERRIDE;
virtual bool multiple() const OVERRIDE;
virtual FontSelector* fontSelector() const OVERRIDE;
virtual HostWindow* hostWindow() const OVERRIDE;
virtual PassRefPtr<Scrollbar> createScrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize) OVERRIDE;

virtual bool hasLineIfEmpty() const { return true; }

@@ -90,33 +90,33 @@ class RenderTextControlSingleLine : public RenderTextControl, private PopupMenuC
const AtomicString& autosaveName() const;

// PopupMenuClient methods
virtual void valueChanged(unsigned listIndex, bool fireEvents = true);
virtual void selectionChanged(unsigned, bool) {}
virtual void selectionCleared() {}
virtual String itemText(unsigned listIndex) const;
virtual String itemLabel(unsigned listIndex) const;
virtual String itemIcon(unsigned listIndex) const;
virtual String itemToolTip(unsigned) const { return String(); }
virtual String itemAccessibilityText(unsigned) const { return String(); }
virtual bool itemIsEnabled(unsigned listIndex) const;
virtual PopupMenuStyle itemStyle(unsigned listIndex) const;
virtual PopupMenuStyle menuStyle() const;
virtual int clientInsetLeft() const;
virtual int clientInsetRight() const;
virtual int clientPaddingLeft() const;
virtual int clientPaddingRight() const;
virtual int listSize() const;
virtual int selectedIndex() const;
virtual void popupDidHide();
virtual bool itemIsSeparator(unsigned listIndex) const;
virtual bool itemIsLabel(unsigned listIndex) const;
virtual bool itemIsSelected(unsigned listIndex) const;
virtual bool shouldPopOver() const { return false; }
virtual bool valueShouldChangeOnHotTrack() const { return false; }
virtual void setTextFromItem(unsigned listIndex);
virtual FontSelector* fontSelector() const;
virtual HostWindow* hostWindow() const;
virtual PassRefPtr<Scrollbar> createScrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize);
virtual void valueChanged(unsigned listIndex, bool fireEvents = true) OVERRIDE;
virtual void selectionChanged(unsigned, bool) OVERRIDE { }
virtual void selectionCleared() OVERRIDE { }
virtual String itemText(unsigned listIndex) const OVERRIDE;
virtual String itemLabel(unsigned listIndex) const OVERRIDE;
virtual String itemIcon(unsigned listIndex) const OVERRIDE;
virtual String itemToolTip(unsigned) const OVERRIDE { return String(); }
virtual String itemAccessibilityText(unsigned) const OVERRIDE { return String(); }
virtual bool itemIsEnabled(unsigned listIndex) const OVERRIDE;
virtual PopupMenuStyle itemStyle(unsigned listIndex) const OVERRIDE;
virtual PopupMenuStyle menuStyle() const OVERRIDE;
virtual int clientInsetLeft() const OVERRIDE;
virtual int clientInsetRight() const OVERRIDE;
virtual int clientPaddingLeft() const OVERRIDE;
virtual int clientPaddingRight() const OVERRIDE;
virtual int listSize() const OVERRIDE;
virtual int selectedIndex() const OVERRIDE;
virtual void popupDidHide() OVERRIDE;
virtual bool itemIsSeparator(unsigned listIndex) const OVERRIDE;
virtual bool itemIsLabel(unsigned listIndex) const OVERRIDE;
virtual bool itemIsSelected(unsigned listIndex) const OVERRIDE;
virtual bool shouldPopOver() const OVERRIDE { return false; }
virtual bool valueShouldChangeOnHotTrack() const OVERRIDE { return false; }
virtual void setTextFromItem(unsigned listIndex) OVERRIDE;
virtual FontSelector* fontSelector() const OVERRIDE;
virtual HostWindow* hostWindow() const OVERRIDE;
virtual PassRefPtr<Scrollbar> createScrollbar(ScrollableArea*, ScrollbarOrientation, ScrollbarControlSize) OVERRIDE;

HTMLInputElement* inputElement() const;

0 comments on commit 3011237

Please sign in to comment.