| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 { | 63 { |
| 64 ASSERT(element); | 64 ASSERT(element); |
| 65 ASSERT(element->isHTMLElement()); | 65 ASSERT(element->isHTMLElement()); |
| 66 ASSERT(element->hasTagName(HTMLNames::selectTag)); | 66 ASSERT(element->hasTagName(HTMLNames::selectTag)); |
| 67 } | 67 } |
| 68 | 68 |
| 69 RenderMenuList::~RenderMenuList() | 69 RenderMenuList::~RenderMenuList() |
| 70 { | 70 { |
| 71 if (m_popup) | 71 if (m_popup) |
| 72 m_popup->disconnectClient(); | 72 m_popup->disconnectClient(); |
| 73 m_popup = 0; | 73 m_popup = nullptr; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // FIXME: Instead of this hack we should add a ShadowRoot to <select> with no in
sertion point | 76 // FIXME: Instead of this hack we should add a ShadowRoot to <select> with no in
sertion point |
| 77 // to prevent children from rendering. | 77 // to prevent children from rendering. |
| 78 bool RenderMenuList::isChildAllowed(RenderObject* object, RenderStyle*) const | 78 bool RenderMenuList::isChildAllowed(RenderObject* object, RenderStyle*) const |
| 79 { | 79 { |
| 80 return object->isAnonymous() && !object->isRenderFullScreen(); | 80 return object->isAnonymous() && !object->isRenderFullScreen(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void RenderMenuList::createInnerBlock() | 83 void RenderMenuList::createInnerBlock() |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 HTMLElement* element = listItems[listIndex]; | 562 HTMLElement* element = listItems[listIndex]; |
| 563 return element->hasTagName(optionTag) && toHTMLOptionElement(element)->selec
ted(); | 563 return element->hasTagName(optionTag) && toHTMLOptionElement(element)->selec
ted(); |
| 564 } | 564 } |
| 565 | 565 |
| 566 void RenderMenuList::setTextFromItem(unsigned listIndex) | 566 void RenderMenuList::setTextFromItem(unsigned listIndex) |
| 567 { | 567 { |
| 568 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); | 568 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); |
| 569 } | 569 } |
| 570 | 570 |
| 571 } | 571 } |
| OLD | NEW |