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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 if (m_popup) | 74 if (m_popup) |
75 m_popup->disconnectClient(); | 75 m_popup->disconnectClient(); |
76 m_popup = nullptr; | 76 m_popup = nullptr; |
77 RenderFlexibleBox::destroy(); | 77 RenderFlexibleBox::destroy(); |
78 } | 78 } |
79 | 79 |
80 void RenderMenuList::trace(Visitor* visitor) | 80 void RenderMenuList::trace(Visitor* visitor) |
81 { | 81 { |
82 visitor->trace(m_buttonText); | 82 visitor->trace(m_buttonText); |
83 visitor->trace(m_innerBlock); | 83 visitor->trace(m_innerBlock); |
| 84 visitor->trace(m_popup); |
84 RenderFlexibleBox::trace(visitor); | 85 RenderFlexibleBox::trace(visitor); |
85 } | 86 } |
86 | 87 |
87 // FIXME: Instead of this hack we should add a ShadowRoot to <select> with no in
sertion point | 88 // FIXME: Instead of this hack we should add a ShadowRoot to <select> with no in
sertion point |
88 // to prevent children from rendering. | 89 // to prevent children from rendering. |
89 bool RenderMenuList::isChildAllowed(RenderObject* object, RenderStyle*) const | 90 bool RenderMenuList::isChildAllowed(RenderObject* object, RenderStyle*) const |
90 { | 91 { |
91 return object->isAnonymous() && !object->isRenderFullScreen(); | 92 return object->isAnonymous() && !object->isRenderFullScreen(); |
92 } | 93 } |
93 | 94 |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 HTMLElement* element = listItems[listIndex]; | 619 HTMLElement* element = listItems[listIndex]; |
619 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); | 620 return isHTMLOptionElement(*element) && toHTMLOptionElement(*element).select
ed(); |
620 } | 621 } |
621 | 622 |
622 void RenderMenuList::setTextFromItem(unsigned listIndex) | 623 void RenderMenuList::setTextFromItem(unsigned listIndex) |
623 { | 624 { |
624 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); | 625 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); |
625 } | 626 } |
626 | 627 |
627 } // namespace blink | 628 } // namespace blink |
OLD | NEW |