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

Side by Side Diff: content/browser/accessibility/browser_accessibility.cc

Issue 2024053003: Revert of Uses the activedescendant_changed event received from Blink to fire the right focus event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | content/browser/accessibility/browser_accessibility_manager.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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/accessibility/browser_accessibility.h" 5 #include "content/browser/accessibility/browser_accessibility.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 } 124 }
125 125
126 bool BrowserAccessibility::IsTextOnlyObject() const { 126 bool BrowserAccessibility::IsTextOnlyObject() const {
127 return GetRole() == ui::AX_ROLE_STATIC_TEXT || 127 return GetRole() == ui::AX_ROLE_STATIC_TEXT ||
128 GetRole() == ui::AX_ROLE_LINE_BREAK || 128 GetRole() == ui::AX_ROLE_LINE_BREAK ||
129 GetRole() == ui::AX_ROLE_INLINE_TEXT_BOX; 129 GetRole() == ui::AX_ROLE_INLINE_TEXT_BOX;
130 } 130 }
131 131
132 BrowserAccessibility* BrowserAccessibility::PlatformGetChild( 132 BrowserAccessibility* BrowserAccessibility::PlatformGetChild(
133 uint32_t child_index) const { 133 uint32_t child_index) const {
134 DCHECK_LT(child_index, PlatformChildCount());
134 BrowserAccessibility* result = nullptr; 135 BrowserAccessibility* result = nullptr;
135 136
136 if (child_index == 0 && HasIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)) { 137 if (HasIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)) {
137 BrowserAccessibilityManager* child_manager = 138 BrowserAccessibilityManager* child_manager =
138 BrowserAccessibilityManager::FromID( 139 BrowserAccessibilityManager::FromID(
139 GetIntAttribute(ui::AX_ATTR_CHILD_TREE_ID)); 140 GetIntAttribute(ui::AX_ATTR_CHILD_TREE_ID));
140 if (child_manager && child_manager->GetRoot()->GetParent() == this) 141 if (child_manager && child_manager->GetRoot()->GetParent() == this)
141 result = child_manager->GetRoot(); 142 result = child_manager->GetRoot();
142 } else { 143 } else {
143 result = InternalGetChild(child_index); 144 result = InternalGetChild(child_index);
144 } 145 }
145 146
146 return result; 147 return result;
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 break; 1187 break;
1187 1188
1188 manager = root->GetParent()->manager(); 1189 manager = root->GetParent()->manager();
1189 root = manager->GetRoot(); 1190 root = manager->GetRoot();
1190 } 1191 }
1191 1192
1192 return bounds; 1193 return bounds;
1193 } 1194 }
1194 1195
1195 } // namespace content 1196 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698