| 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 21 matching lines...) Expand all Loading... |
| 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 RenderMenuList(Element*); |
| 41 virtual ~RenderMenuList(); | 41 virtual ~RenderMenuList(); |
| 42 virtual void trace(Visitor*) OVERRIDE; |
| 42 | 43 |
| 43 public: | 44 public: |
| 44 bool popupIsVisible() const { return m_popupIsVisible; } | 45 bool popupIsVisible() const { return m_popupIsVisible; } |
| 45 void showPopup(); | 46 void showPopup(); |
| 46 void hidePopup(); | 47 void hidePopup(); |
| 47 | 48 |
| 48 void setOptionsChanged(bool changed) { m_optionsChanged = changed; } | 49 void setOptionsChanged(bool changed) { m_optionsChanged = changed; } |
| 49 | 50 |
| 50 void didSetSelectedIndex(int listIndex); | 51 void didSetSelectedIndex(int listIndex); |
| 51 | 52 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 void getItemBackgroundColor(unsigned listIndex, Color&, bool& itemHasCustomB
ackgroundColor) const; | 112 void getItemBackgroundColor(unsigned listIndex, Color&, bool& itemHasCustomB
ackgroundColor) const; |
| 112 | 113 |
| 113 void createInnerBlock(); | 114 void createInnerBlock(); |
| 114 void adjustInnerStyle(); | 115 void adjustInnerStyle(); |
| 115 void setText(const String&); | 116 void setText(const String&); |
| 116 void setTextFromOption(int optionIndex); | 117 void setTextFromOption(int optionIndex); |
| 117 void updateOptionsWidth(); | 118 void updateOptionsWidth(); |
| 118 | 119 |
| 119 void didUpdateActiveOption(int optionIndex); | 120 void didUpdateActiveOption(int optionIndex); |
| 120 | 121 |
| 121 RenderText* m_buttonText; | 122 RawPtrWillBeMember<RenderText> m_buttonText; |
| 122 RenderBlock* m_innerBlock; | 123 RawPtrWillBeMember<RenderBlock> m_innerBlock; |
| 123 | 124 |
| 124 bool m_optionsChanged; | 125 bool m_optionsChanged; |
| 125 int m_optionsWidth; | 126 int m_optionsWidth; |
| 126 | 127 |
| 127 int m_lastActiveIndex; | 128 int m_lastActiveIndex; |
| 128 | 129 |
| 129 RefPtr<RenderStyle> m_optionStyle; | 130 RefPtr<RenderStyle> m_optionStyle; |
| 130 | 131 |
| 131 RefPtr<PopupMenu> m_popup; | 132 RefPtr<PopupMenu> m_popup; |
| 132 bool m_popupIsVisible; | 133 bool m_popupIsVisible; |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMenuList, isMenuList()); | 136 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMenuList, isMenuList()); |
| 136 | 137 |
| 137 } | 138 } |
| 138 | 139 |
| 139 #endif | 140 #endif |
| OLD | NEW |