Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Side by Side Diff: Source/core/rendering/RenderMenuList.h

Issue 129173004: Update rendering classes to use OVERRIDE / FINAL when needed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderMediaControlElements.h ('k') | Source/core/rendering/RenderMeter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of the select element renderer in WebCore. 2 * This file is part of the select element renderer in WebCore.
3 * 3 *
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 void setOptionsChanged(bool changed) { m_optionsChanged = changed; } 48 void setOptionsChanged(bool changed) { m_optionsChanged = changed; }
49 49
50 void didSetSelectedIndex(int listIndex); 50 void didSetSelectedIndex(int listIndex);
51 51
52 String text() const; 52 String text() const;
53 53
54 private: 54 private:
55 HTMLSelectElement* selectElement() const; 55 HTMLSelectElement* selectElement() const;
56 56
57 virtual bool isMenuList() const { return true; } 57 virtual bool isMenuList() const OVERRIDE { return true; }
58 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE; 58 virtual bool isChildAllowed(RenderObject*, RenderStyle*) const OVERRIDE;
59 59
60 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) ; 60 virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE;
61 virtual void removeChild(RenderObject*); 61 virtual void removeChild(RenderObject*) OVERRIDE;
62 virtual bool createsAnonymousWrapper() const { return true; } 62 virtual bool createsAnonymousWrapper() const OVERRIDE { return true; }
63 63
64 virtual void updateFromElement(); 64 virtual void updateFromElement() OVERRIDE;
65 65
66 virtual LayoutRect controlClipRect(const LayoutPoint&) const; 66 virtual LayoutRect controlClipRect(const LayoutPoint&) const OVERRIDE;
67 virtual bool hasControlClip() const { return true; } 67 virtual bool hasControlClip() const OVERRIDE { return true; }
68 virtual bool canHaveGeneratedChildren() const OVERRIDE { return false; } 68 virtual bool canHaveGeneratedChildren() const OVERRIDE { return false; }
69 69
70 virtual const char* renderName() const { return "RenderMenuList"; } 70 virtual const char* renderName() const OVERRIDE { return "RenderMenuList"; }
71 71
72 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const OVERRIDE; 72 virtual void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, Layo utUnit& maxLogicalWidth) const OVERRIDE;
73 virtual void computePreferredLogicalWidths() OVERRIDE; 73 virtual void computePreferredLogicalWidths() OVERRIDE;
74 74
75 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 75 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) OV ERRIDE;
76 76
77 // PopupMenuClient methods 77 // PopupMenuClient methods
78 virtual void valueChanged(unsigned listIndex, bool fireOnChange = true) OVER RIDE; 78 virtual void valueChanged(unsigned listIndex, bool fireOnChange = true) OVER RIDE;
79 virtual void selectionChanged(unsigned, bool) OVERRIDE { } 79 virtual void selectionChanged(unsigned, bool) OVERRIDE { }
80 virtual void selectionCleared() OVERRIDE { } 80 virtual void selectionCleared() OVERRIDE { }
81 virtual String itemText(unsigned listIndex) const OVERRIDE; 81 virtual String itemText(unsigned listIndex) const OVERRIDE;
82 virtual String itemToolTip(unsigned listIndex) const OVERRIDE; 82 virtual String itemToolTip(unsigned listIndex) const OVERRIDE;
83 virtual String itemAccessibilityText(unsigned listIndex) const OVERRIDE; 83 virtual String itemAccessibilityText(unsigned listIndex) const OVERRIDE;
84 virtual bool itemIsEnabled(unsigned listIndex) const OVERRIDE; 84 virtual bool itemIsEnabled(unsigned listIndex) const OVERRIDE;
85 virtual PopupMenuStyle itemStyle(unsigned listIndex) const OVERRIDE; 85 virtual PopupMenuStyle itemStyle(unsigned listIndex) const OVERRIDE;
86 virtual PopupMenuStyle menuStyle() const OVERRIDE; 86 virtual PopupMenuStyle menuStyle() const OVERRIDE;
87 virtual LayoutUnit clientPaddingLeft() const OVERRIDE; 87 virtual LayoutUnit clientPaddingLeft() const OVERRIDE;
88 virtual LayoutUnit clientPaddingRight() const OVERRIDE; 88 virtual LayoutUnit clientPaddingRight() const OVERRIDE;
89 virtual int listSize() const OVERRIDE; 89 virtual int listSize() const OVERRIDE;
90 virtual int selectedIndex() const OVERRIDE; 90 virtual int selectedIndex() const OVERRIDE;
91 virtual void popupDidHide() OVERRIDE; 91 virtual void popupDidHide() OVERRIDE;
92 virtual bool itemIsSeparator(unsigned listIndex) const OVERRIDE; 92 virtual bool itemIsSeparator(unsigned listIndex) const OVERRIDE;
93 virtual bool itemIsLabel(unsigned listIndex) const OVERRIDE; 93 virtual bool itemIsLabel(unsigned listIndex) const OVERRIDE;
94 virtual bool itemIsSelected(unsigned listIndex) const OVERRIDE; 94 virtual bool itemIsSelected(unsigned listIndex) const OVERRIDE;
95 virtual bool valueShouldChangeOnHotTrack() const OVERRIDE { return true; } 95 virtual bool valueShouldChangeOnHotTrack() const OVERRIDE { return true; }
96 virtual void setTextFromItem(unsigned listIndex) OVERRIDE; 96 virtual void setTextFromItem(unsigned listIndex) OVERRIDE;
97 virtual void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true) OVERRIDE; 97 virtual void listBoxSelectItem(int listIndex, bool allowMultiplySelections, bool shift, bool fireOnChangeNow = true) OVERRIDE;
98 virtual bool multiple() const OVERRIDE; 98 virtual bool multiple() const OVERRIDE;
99 virtual FontSelector* fontSelector() const OVERRIDE; 99 virtual FontSelector* fontSelector() const OVERRIDE;
100 virtual HostWindow* hostWindow() const OVERRIDE; 100 virtual HostWindow* hostWindow() const OVERRIDE;
101 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollableArea*, ScrollbarOrie ntation, ScrollbarControlSize) OVERRIDE; 101 virtual PassRefPtr<Scrollbar> createScrollbar(ScrollableArea*, ScrollbarOrie ntation, ScrollbarControlSize) OVERRIDE;
102 102
103 virtual bool hasLineIfEmpty() const { return true; } 103 virtual bool hasLineIfEmpty() const OVERRIDE { return true; }
104 104
105 // Flexbox defines baselines differently than regular blocks. 105 // Flexbox defines baselines differently than regular blocks.
106 // For backwards compatibility, menulists need to do the regular block behav ior. 106 // For backwards compatibility, menulists need to do the regular block behav ior.
107 virtual int baselinePosition(FontBaseline baseline, bool firstLine, LineDire ctionMode direction, LinePositionMode position) const OVERRIDE 107 virtual int baselinePosition(FontBaseline baseline, bool firstLine, LineDire ctionMode direction, LinePositionMode position) const OVERRIDE
108 { 108 {
109 return RenderBlock::baselinePosition(baseline, firstLine, direction, pos ition); 109 return RenderBlock::baselinePosition(baseline, firstLine, direction, pos ition);
110 } 110 }
111 virtual int firstLineBoxBaseline() const OVERRIDE { return RenderBlock::firs tLineBoxBaseline(); } 111 virtual int firstLineBoxBaseline() const OVERRIDE { return RenderBlock::firs tLineBoxBaseline(); }
112 virtual int inlineBlockBaseline(LineDirectionMode direction) const OVERRIDE { return RenderBlock::inlineBlockBaseline(direction); } 112 virtual int inlineBlockBaseline(LineDirectionMode direction) const OVERRIDE { return RenderBlock::inlineBlockBaseline(direction); }
113 113
(...skipping 19 matching lines...) Expand all
133 133
134 RefPtr<PopupMenu> m_popup; 134 RefPtr<PopupMenu> m_popup;
135 bool m_popupIsVisible; 135 bool m_popupIsVisible;
136 }; 136 };
137 137
138 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMenuList, isMenuList()); 138 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMenuList, isMenuList());
139 139
140 } 140 }
141 141
142 #endif 142 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMediaControlElements.h ('k') | Source/core/rendering/RenderMeter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698