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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 HTMLSelectElement* listBoxParentNode = listBoxOptionParentNode(); 98 HTMLSelectElement* listBoxParentNode = listBoxOptionParentNode();
99 if (!listBoxParentNode) 99 if (!listBoxParentNode)
100 return rect; 100 return rect;
101 101
102 RenderObject* listBoxRenderer = listBoxParentNode->renderer(); 102 RenderObject* listBoxRenderer = listBoxParentNode->renderer();
103 if (!listBoxRenderer) 103 if (!listBoxRenderer)
104 return rect; 104 return rect;
105 105
106 LayoutRect parentRect = listBoxRenderer->document().axObjectCache()->getOrCr eate(listBoxRenderer)->elementRect(); 106 LayoutRect parentRect = listBoxRenderer->document().axObjectCache()->getOrCr eate(listBoxRenderer)->elementRect();
107 int index = listBoxOptionIndex(); 107 int index = listBoxOptionIndex();
108 if (index != -1) 108 if (index != -1) {
109 rect = toRenderListBox(listBoxRenderer)->itemBoundingBoxRect(parentRect. location(), index); 109 RenderListBox* listBox = toRenderListBox(listBoxRenderer);
110 rect = listBox->itemBoundingBoxRect(parentRect.location(), listBox->toRe nderListBoxIndex(index));
keishi 2014/04/11 06:40:13 Ditto. toRenderListBoxIndex should be done inside
111 }
110 112
111 return rect; 113 return rect;
112 } 114 }
113 115
114 bool AXListBoxOption::computeAccessibilityIsIgnored() const 116 bool AXListBoxOption::computeAccessibilityIsIgnored() const
115 { 117 {
116 if (!m_optionElement) 118 if (!m_optionElement)
117 return true; 119 return true;
118 120
119 if (accessibilityIsIgnoredByDefault()) 121 if (accessibilityIsIgnoredByDefault())
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 unsigned length = listItems.size(); 216 unsigned length = listItems.size();
215 for (unsigned i = 0; i < length; i++) { 217 for (unsigned i = 0; i < length; i++) {
216 if (listItems[i] == m_optionElement) 218 if (listItems[i] == m_optionElement)
217 return i; 219 return i;
218 } 220 }
219 221
220 return -1; 222 return -1;
221 } 223 }
222 224
223 } // namespace WebCore 225 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698