Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: Source/core/accessibility/AXListBoxOption.cpp

Issue 189543012: Update <select> when any of its <option> children has "display: none" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addtional layout test included. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/accessibility/AXListBoxOption.cpp
diff --git a/Source/core/accessibility/AXListBoxOption.cpp b/Source/core/accessibility/AXListBoxOption.cpp
index 2aa6c2e9e363d13d468341d58972dc7f0b1c2c4d..fd617bdd32f695e44af69a5d2aff30892766883e 100644
--- a/Source/core/accessibility/AXListBoxOption.cpp
+++ b/Source/core/accessibility/AXListBoxOption.cpp
@@ -105,8 +105,10 @@ LayoutRect AXListBoxOption::elementRect() const
LayoutRect parentRect = listBoxRenderer->document().axObjectCache()->getOrCreate(listBoxRenderer)->elementRect();
int index = listBoxOptionIndex();
- if (index != -1)
- rect = toRenderListBox(listBoxRenderer)->itemBoundingBoxRect(parentRect.location(), index);
+ if (index != -1) {
+ RenderListBox* listBox = toRenderListBox(listBoxRenderer);
+ rect = listBox->itemBoundingBoxRect(parentRect.location(), listBox->toRenderListBoxIndex(index));
keishi 2014/04/11 06:40:13 Ditto. toRenderListBoxIndex should be done inside
+ }
return rect;
}

Powered by Google App Engine
This is Rietveld 408576698