OLD | NEW |
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 19 matching lines...) Expand all Loading... |
30 #include "platform/geometry/LayoutRect.h" | 30 #include "platform/geometry/LayoutRect.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class HTMLSelectElement; | 34 class HTMLSelectElement; |
35 class RenderText; | 35 class RenderText; |
36 | 36 |
37 class RenderMenuList final : public RenderFlexibleBox, private PopupMenuClient { | 37 class RenderMenuList final : public RenderFlexibleBox, private PopupMenuClient { |
38 | 38 |
39 public: | 39 public: |
40 RenderMenuList(Element*); | 40 explicit RenderMenuList(Element*); |
41 virtual ~RenderMenuList(); | 41 virtual ~RenderMenuList(); |
42 virtual void destroy() override; | 42 virtual void destroy() override; |
43 virtual void trace(Visitor*) override; | |
44 | 43 |
45 bool popupIsVisible() const { return m_popupIsVisible; } | 44 bool popupIsVisible() const { return m_popupIsVisible; } |
46 void showPopup(); | 45 void showPopup(); |
47 void hidePopup(); | 46 void hidePopup(); |
48 PopupMenu* popup() const { return m_popup.get(); } | 47 PopupMenu* popup() const { return m_popup.get(); } |
49 | 48 |
50 void setOptionsChanged(bool changed) { m_optionsChanged = changed; } | 49 void setOptionsChanged(bool changed) { m_optionsChanged = changed; } |
51 | 50 |
52 void didSetSelectedIndex(int listIndex); | 51 void didSetSelectedIndex(int listIndex); |
53 | 52 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void getItemBackgroundColor(unsigned listIndex, Color&, bool& itemHasCustomB
ackgroundColor) const; | 111 void getItemBackgroundColor(unsigned listIndex, Color&, bool& itemHasCustomB
ackgroundColor) const; |
113 | 112 |
114 void createInnerBlock(); | 113 void createInnerBlock(); |
115 void adjustInnerStyle(); | 114 void adjustInnerStyle(); |
116 void setText(const String&); | 115 void setText(const String&); |
117 void setTextFromOption(int optionIndex); | 116 void setTextFromOption(int optionIndex); |
118 void updateOptionsWidth(); | 117 void updateOptionsWidth(); |
119 | 118 |
120 void didUpdateActiveOption(int optionIndex); | 119 void didUpdateActiveOption(int optionIndex); |
121 | 120 |
122 RawPtrWillBeMember<RenderText> m_buttonText; | 121 RenderText* m_buttonText; |
123 RawPtrWillBeMember<RenderBlock> m_innerBlock; | 122 RenderBlock* m_innerBlock; |
124 | 123 |
125 bool m_optionsChanged; | 124 bool m_optionsChanged; |
126 int m_optionsWidth; | 125 int m_optionsWidth; |
127 | 126 |
128 int m_lastActiveIndex; | 127 int m_lastActiveIndex; |
129 | 128 |
130 RefPtr<RenderStyle> m_optionStyle; | 129 RefPtr<RenderStyle> m_optionStyle; |
131 | 130 |
132 RefPtrWillBeMember<PopupMenu> m_popup; | 131 RefPtrWillBePersistent<PopupMenu> m_popup; |
133 bool m_popupIsVisible; | 132 bool m_popupIsVisible; |
134 }; | 133 }; |
135 | 134 |
136 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMenuList, isMenuList()); | 135 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMenuList, isMenuList()); |
137 | 136 |
138 } | 137 } |
139 | 138 |
140 #endif | 139 #endif |
OLD | NEW |