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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXListBox.cpp

Issue 2858493002: Rename AXObject to AXObjectImpl in modules/ and web/ (Closed)
Patch Set: Fixed rebase Created 3 years, 7 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 return new AXListBox(layout_object, ax_object_cache); 50 return new AXListBox(layout_object, ax_object_cache);
51 } 51 }
52 52
53 AccessibilityRole AXListBox::DetermineAccessibilityRole() { 53 AccessibilityRole AXListBox::DetermineAccessibilityRole() {
54 if ((aria_role_ = DetermineAriaRoleAttribute()) != kUnknownRole) 54 if ((aria_role_ = DetermineAriaRoleAttribute()) != kUnknownRole)
55 return aria_role_; 55 return aria_role_;
56 56
57 return kListBoxRole; 57 return kListBoxRole;
58 } 58 }
59 59
60 AXObject* AXListBox::ActiveDescendant() { 60 AXObjectImpl* AXListBox::ActiveDescendant() {
61 if (!isHTMLSelectElement(GetNode())) 61 if (!isHTMLSelectElement(GetNode()))
62 return nullptr; 62 return nullptr;
63 63
64 HTMLSelectElement* select = toHTMLSelectElement(GetNode()); 64 HTMLSelectElement* select = toHTMLSelectElement(GetNode());
65 int active_index = select->ActiveSelectionEndListIndex(); 65 int active_index = select->ActiveSelectionEndListIndex();
66 if (active_index >= 0 && active_index < static_cast<int>(select->length())) { 66 if (active_index >= 0 && active_index < static_cast<int>(select->length())) {
67 HTMLOptionElement* option = select->item(active_index_); 67 HTMLOptionElement* option = select->item(active_index_);
68 return AxObjectCache().Get(option); 68 return AxObjectCache().Get(option);
69 } 69 }
70 70
(...skipping 11 matching lines...) Expand all
82 82
83 active_index_ = active_index; 83 active_index_ = active_index;
84 if (!select->IsFocused()) 84 if (!select->IsFocused())
85 return; 85 return;
86 86
87 AxObjectCache().PostNotification( 87 AxObjectCache().PostNotification(
88 this, AXObjectCacheImpl::kAXActiveDescendantChanged); 88 this, AXObjectCacheImpl::kAXActiveDescendantChanged);
89 } 89 }
90 90
91 } // namespace blink 91 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698