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

Side by Side Diff: Source/core/html/HTMLSelectElement.cpp

Issue 1034493005: Fire AX notifications on list box options. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@menu_list_more
Patch Set: Update expectations for other test that failed Created 5 years, 8 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 | « Source/core/html/HTMLOptionElement.cpp ('k') | Source/modules/accessibility/AXListBox.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) 2010 Nokia Corporation and/or its subsidiary(-ies). 2 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * (C) 1999 Antti Koivisto (koivisto@kde.org) 4 * (C) 1999 Antti Koivisto (koivisto@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * 10 *
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 } 723 }
724 724
725 void HTMLSelectElement::scrollToSelection() 725 void HTMLSelectElement::scrollToSelection()
726 { 726 {
727 if (!isFinishedParsingChildren()) 727 if (!isFinishedParsingChildren())
728 return; 728 return;
729 if (usesMenuList()) 729 if (usesMenuList())
730 return; 730 return;
731 scrollToIndex(activeSelectionEndListIndex()); 731 scrollToIndex(activeSelectionEndListIndex());
732 if (AXObjectCache* cache = document().existingAXObjectCache()) 732 if (AXObjectCache* cache = document().existingAXObjectCache())
733 cache->selectedChildrenChanged(this); 733 cache->listboxActiveIndexChanged(this);
734 } 734 }
735 735
736 void HTMLSelectElement::setOptionsChangedOnRenderer() 736 void HTMLSelectElement::setOptionsChangedOnRenderer()
737 { 737 {
738 if (LayoutObject* renderer = this->layoutObject()) { 738 if (LayoutObject* renderer = this->layoutObject()) {
739 if (usesMenuList()) 739 if (usesMenuList())
740 toLayoutMenuList(renderer)->setOptionsChanged(true); 740 toLayoutMenuList(renderer)->setOptionsChanged(true);
741 } 741 }
742 } 742 }
743 743
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 scrollToSelection(); 963 scrollToSelection();
964 setNeedsValidityCheck(); 964 setNeedsValidityCheck();
965 965
966 if (usesMenuList()) { 966 if (usesMenuList()) {
967 m_isProcessingUserDrivenChange = flags & UserDriven; 967 m_isProcessingUserDrivenChange = flags & UserDriven;
968 if (flags & DispatchInputAndChangeEvent) 968 if (flags & DispatchInputAndChangeEvent)
969 dispatchInputAndChangeEventForMenuList(); 969 dispatchInputAndChangeEventForMenuList();
970 if (LayoutObject* renderer = this->layoutObject()) { 970 if (LayoutObject* renderer = this->layoutObject()) {
971 if (usesMenuList()) { 971 if (usesMenuList()) {
972 toLayoutMenuList(renderer)->didSetSelectedIndex(listIndex); 972 toLayoutMenuList(renderer)->didSetSelectedIndex(listIndex);
973 } else if (renderer->isListBox()) {
974 if (AXObjectCache* cache = document().existingAXObjectCache())
975 cache->selectedChildrenChanged(this);
976 } 973 }
977 } 974 }
978 } 975 }
979 976
980 notifyFormStateChanged(); 977 notifyFormStateChanged();
981 } 978 }
982 979
983 int HTMLSelectElement::optionToListIndex(int optionIndex) const 980 int HTMLSelectElement::optionToListIndex(int optionIndex) const
984 { 981 {
985 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement>>& items = listItems() ; 982 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement>>& items = listItems() ;
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 int focusedIndex = activeSelectionEndListIndex(); 1765 int focusedIndex = activeSelectionEndListIndex();
1769 if (focusedIndex < 0) 1766 if (focusedIndex < 0)
1770 focusedIndex = firstSelectableListIndex(); 1767 focusedIndex = firstSelectableListIndex();
1771 if (focusedIndex < 0) 1768 if (focusedIndex < 0)
1772 return nullptr; 1769 return nullptr;
1773 HTMLElement* focused = listItems()[focusedIndex]; 1770 HTMLElement* focused = listItems()[focusedIndex];
1774 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr ; 1771 return isHTMLOptionElement(focused) ? toHTMLOptionElement(focused) : nullptr ;
1775 } 1772 }
1776 1773
1777 } // namespace 1774 } // namespace
OLDNEW
« no previous file with comments | « Source/core/html/HTMLOptionElement.cpp ('k') | Source/modules/accessibility/AXListBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698