| 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 m_lastActiveIndex = optionIndex; | 381 m_lastActiveIndex = optionIndex; |
| 382 | 382 |
| 383 HTMLSelectElement* select = selectElement(); | 383 HTMLSelectElement* select = selectElement(); |
| 384 int listIndex = select->optionToListIndex(optionIndex); | 384 int listIndex = select->optionToListIndex(optionIndex); |
| 385 if (listIndex < 0 || listIndex >= static_cast<int>(select->listItems().size(
))) | 385 if (listIndex < 0 || listIndex >= static_cast<int>(select->listItems().size(
))) |
| 386 return; | 386 return; |
| 387 | 387 |
| 388 HTMLElement* listItem = select->listItems()[listIndex]; | 388 HTMLElement* listItem = select->listItems()[listIndex]; |
| 389 ASSERT(listItem); | 389 ASSERT(listItem); |
| 390 if (listItem->attached()) { | 390 if (listItem->attached()) { |
| 391 if (AccessibilityMenuList* menuList = static_cast<AccessibilityMenuList*
>(document().axObjectCache()->get(this))) | 391 if (AccessibilityMenuList* menuList = toAccessibilityMenuList(document()
.axObjectCache()->get(this))) |
| 392 menuList->didUpdateActiveOption(optionIndex); | 392 menuList->didUpdateActiveOption(optionIndex); |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 | 395 |
| 396 String RenderMenuList::itemText(unsigned listIndex) const | 396 String RenderMenuList::itemText(unsigned listIndex) const |
| 397 { | 397 { |
| 398 HTMLSelectElement* select = selectElement(); | 398 HTMLSelectElement* select = selectElement(); |
| 399 const Vector<HTMLElement*>& listItems = select->listItems(); | 399 const Vector<HTMLElement*>& listItems = select->listItems(); |
| 400 if (listIndex >= listItems.size()) | 400 if (listIndex >= listItems.size()) |
| 401 return String(); | 401 return String(); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 { | 610 { |
| 611 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); | 611 setTextFromOption(selectElement()->listToOptionIndex(listIndex)); |
| 612 } | 612 } |
| 613 | 613 |
| 614 FontSelector* RenderMenuList::fontSelector() const | 614 FontSelector* RenderMenuList::fontSelector() const |
| 615 { | 615 { |
| 616 return document().styleResolver()->fontSelector(); | 616 return document().styleResolver()->fontSelector(); |
| 617 } | 617 } |
| 618 | 618 |
| 619 } | 619 } |
| OLD | NEW |