| 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 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 6 * 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 , m_optionsChanged(true) | 58 , m_optionsChanged(true) |
| 59 , m_optionsWidth(0) | 59 , m_optionsWidth(0) |
| 60 , m_lastActiveIndex(-1) | 60 , m_lastActiveIndex(-1) |
| 61 , m_popupIsVisible(false) | 61 , m_popupIsVisible(false) |
| 62 { | 62 { |
| 63 ASSERT(isHTMLSelectElement(element)); | 63 ASSERT(isHTMLSelectElement(element)); |
| 64 } | 64 } |
| 65 | 65 |
| 66 RenderMenuList::~RenderMenuList() | 66 RenderMenuList::~RenderMenuList() |
| 67 { | 67 { |
| 68 ASSERT(!m_popup); |
| 69 } |
| 70 |
| 71 void RenderMenuList::destroy() |
| 72 { |
| 68 if (m_popup) | 73 if (m_popup) |
| 69 m_popup->disconnectClient(); | 74 m_popup->disconnectClient(); |
| 70 m_popup = nullptr; | 75 m_popup = nullptr; |
| 76 RenderFlexibleBox::destroy(); |
| 71 } | 77 } |
| 72 | 78 |
| 73 void RenderMenuList::trace(Visitor* visitor) | 79 void RenderMenuList::trace(Visitor* visitor) |
| 74 { | 80 { |
| 75 visitor->trace(m_buttonText); | 81 visitor->trace(m_buttonText); |
| 76 visitor->trace(m_innerBlock); | 82 visitor->trace(m_innerBlock); |
| 77 RenderFlexibleBox::trace(visitor); | 83 RenderFlexibleBox::trace(visitor); |
| 78 } | 84 } |
| 79 | 85 |
| 80 // FIXME: Instead of this hack we should add a ShadowRoot to <select> with no in
sertion point | 86 // FIXME: Instead of this hack we should add a ShadowRoot to <select> with no in
sertion point |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 HTMLElement* element = listItems[listIndex]; | 617 HTMLElement* element = listItems[listIndex]; |
| 612 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); | 618 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); |
| 613 } | 619 } |
| 614 | 620 |
| 615 void RenderMenuList::setTextFromItem(unsigned listIndex) | 621 void RenderMenuList::setTextFromItem(unsigned listIndex) |
| 616 { | 622 { |
| 617 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); | 623 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); |
| 618 } | 624 } |
| 619 | 625 |
| 620 } | 626 } |
| OLD | NEW |