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

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

Issue 2151713002: Less strict checked state changes and introduce disabled state for content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 4 years, 4 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 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_android.h" 5 #include "content/browser/accessibility/browser_accessibility_android.h"
6 6
7 #include "base/i18n/break_iterator.h" 7 #include "base/i18n/break_iterator.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 bool BrowserAccessibilityAndroid::IsDismissable() const { 189 bool BrowserAccessibilityAndroid::IsDismissable() const {
190 return false; // No concept of "dismissable" on the web currently. 190 return false; // No concept of "dismissable" on the web currently.
191 } 191 }
192 192
193 bool BrowserAccessibilityAndroid::IsEditableText() const { 193 bool BrowserAccessibilityAndroid::IsEditableText() const {
194 return GetRole() == ui::AX_ROLE_TEXT_FIELD; 194 return GetRole() == ui::AX_ROLE_TEXT_FIELD;
195 } 195 }
196 196
197 bool BrowserAccessibilityAndroid::IsEnabled() const { 197 bool BrowserAccessibilityAndroid::IsEnabled() const {
198 return HasState(ui::AX_STATE_ENABLED); 198 return !HasState(ui::AX_STATE_DISABLED);
199 } 199 }
200 200
201 bool BrowserAccessibilityAndroid::IsFocusable() const { 201 bool BrowserAccessibilityAndroid::IsFocusable() const {
202 bool focusable = HasState(ui::AX_STATE_FOCUSABLE); 202 bool focusable = HasState(ui::AX_STATE_FOCUSABLE);
203 if (IsIframe() || 203 if (IsIframe() ||
204 GetRole() == ui::AX_ROLE_WEB_AREA) { 204 GetRole() == ui::AX_ROLE_WEB_AREA) {
205 focusable = false; 205 focusable = false;
206 } 206 }
207 return focusable; 207 return focusable;
208 } 208 }
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { 1412 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const {
1413 int count = 0; 1413 int count = 0;
1414 for (uint32_t i = 0; i < PlatformChildCount(); i++) { 1414 for (uint32_t i = 0; i < PlatformChildCount(); i++) {
1415 if (PlatformGetChild(i)->GetRole() == role) 1415 if (PlatformGetChild(i)->GetRole() == role)
1416 count++; 1416 count++;
1417 } 1417 }
1418 return count; 1418 return count;
1419 } 1419 }
1420 1420
1421 } // namespace content 1421 } // namespace content
OLDNEW
« no previous file with comments | « components/pdf/renderer/pdf_accessibility_tree.cc ('k') | content/browser/accessibility/browser_accessibility_auralinux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698