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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLOptionElement.cpp

Issue 2147963004: AX: Don't use listIndex in AXListBoxOption class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 5 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2010 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved. 8 * Copyright (C) 2011 Motorola Mobility, Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 appendChild(Text::create(document(), text), exceptionState); 164 appendChild(Text::create(document(), text), exceptionState);
165 } 165 }
166 166
167 if (selectIsMenuList && select->selectedIndex() != oldSelectedIndex) 167 if (selectIsMenuList && select->selectedIndex() != oldSelectedIndex)
168 select->setSelectedIndex(oldSelectedIndex); 168 select->setSelectedIndex(oldSelectedIndex);
169 } 169 }
170 170
171 void HTMLOptionElement::accessKeyAction(bool) 171 void HTMLOptionElement::accessKeyAction(bool)
172 { 172 {
173 if (HTMLSelectElement* select = ownerSelectElement()) 173 if (HTMLSelectElement* select = ownerSelectElement())
174 select->accessKeySetSelectedIndex(index()); 174 select->selectOptionByAccessKey(this);
175 } 175 }
176 176
177 int HTMLOptionElement::index() const 177 int HTMLOptionElement::index() const
178 { 178 {
179 // It would be faster to cache the index, but harder to get it right in all cases. 179 // It would be faster to cache the index, but harder to get it right in all cases.
180 180
181 HTMLSelectElement* selectElement = ownerSelectElement(); 181 HTMLSelectElement* selectElement = ownerSelectElement();
182 if (!selectElement) 182 if (!selectElement)
183 return 0; 183 return 0;
184 184
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 ASSERT(parent); 467 ASSERT(parent);
468 if (isHTMLOptGroupElement(*parent)) { 468 if (isHTMLOptGroupElement(*parent)) {
469 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle(); 469 const ComputedStyle* parentStyle = parent->computedStyle() ? parent- >computedStyle() : parent->ensureComputedStyle();
470 return !parentStyle || parentStyle->display() == NONE; 470 return !parentStyle || parentStyle->display() == NONE;
471 } 471 }
472 } 472 }
473 return m_style->display() == NONE; 473 return m_style->display() == NONE;
474 } 474 }
475 475
476 } // namespace blink 476 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698