| Index: Source/core/layout/LayoutMenuList.cpp
|
| diff --git a/Source/core/layout/LayoutMenuList.cpp b/Source/core/layout/LayoutMenuList.cpp
|
| index d7ca095422b4bf7009982a7f2006fa03c74e8242..5c3b49f453564aae36a3d36756e33ac5ea8d2024 100644
|
| --- a/Source/core/layout/LayoutMenuList.cpp
|
| +++ b/Source/core/layout/LayoutMenuList.cpp
|
| @@ -400,11 +400,6 @@ Element& LayoutMenuList::ownerElement() const
|
| return *selectElement();
|
| }
|
|
|
| -const ComputedStyle* LayoutMenuList::computedStyleForItem(Element& element) const
|
| -{
|
| - return element.computedStyle() ? element.computedStyle() : element.ensureComputedStyle();
|
| -}
|
| -
|
| const ComputedStyle* LayoutMenuList::computedStyleForItem(unsigned listIndex) const
|
| {
|
| Element& element = *selectElement()->listItems()[listIndex];
|
| @@ -440,6 +435,11 @@ void LayoutMenuList::didUpdateActiveOption(int optionIndex)
|
| document().existingAXObjectCache()->handleUpdateActiveMenuOption(this, optionIndex);
|
| }
|
|
|
| +Element& LayoutMenuList::itemElement(unsigned listIndex) const
|
| +{
|
| + return *selectElement()->listItems()[listIndex];
|
| +}
|
| +
|
| String LayoutMenuList::itemText(unsigned listIndex) const
|
| {
|
| HTMLSelectElement* select = selectElement();
|
| @@ -500,7 +500,7 @@ bool LayoutMenuList::itemIsDisplayNone(unsigned listIndex) const
|
| Element& element = *selectElement()->listItems()[listIndex];
|
| if (isHTMLOptionElement(element))
|
| return toHTMLOptionElement(element).isDisplayNone();
|
| - if (const ComputedStyle* style = computedStyleForItem(element))
|
| + if (const ComputedStyle* style = computedStyleForItem(listIndex))
|
| return style->display() == NONE;
|
| return false;
|
| }
|
|
|