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

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

Issue 755883006: Remove unused roles(EditableText, SplitGroup, GrowArea) from Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 (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 "base/logging.h" 7 #include "base/logging.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/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 bool BrowserAccessibility::PlatformIsLeaf() const { 46 bool BrowserAccessibility::PlatformIsLeaf() const {
47 if (InternalChildCount() == 0) 47 if (InternalChildCount() == 0)
48 return true; 48 return true;
49 49
50 // All of these roles may have children that we use as internal 50 // All of these roles may have children that we use as internal
51 // implementation details, but we want to expose them as leaves 51 // implementation details, but we want to expose them as leaves
52 // to platform accessibility APIs. 52 // to platform accessibility APIs.
53 switch (GetRole()) { 53 switch (GetRole()) {
54 case ui::AX_ROLE_EDITABLE_TEXT:
55 case ui::AX_ROLE_SLIDER: 54 case ui::AX_ROLE_SLIDER:
56 case ui::AX_ROLE_STATIC_TEXT: 55 case ui::AX_ROLE_STATIC_TEXT:
57 case ui::AX_ROLE_TEXT_AREA: 56 case ui::AX_ROLE_TEXT_AREA:
58 case ui::AX_ROLE_TEXT_FIELD: 57 case ui::AX_ROLE_TEXT_FIELD:
59 return true; 58 return true;
60 default: 59 default:
61 return false; 60 return false;
62 } 61 }
63 } 62 }
64 63
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 if (GetRole() == ui::AX_ROLE_STATIC_TEXT) 693 if (GetRole() == ui::AX_ROLE_STATIC_TEXT)
695 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size()); 694 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size());
696 695
697 int len = 0; 696 int len = 0;
698 for (size_t i = 0; i < InternalChildCount(); ++i) 697 for (size_t i = 0; i < InternalChildCount(); ++i)
699 len += InternalGetChild(i)->GetStaticTextLenRecursive(); 698 len += InternalGetChild(i)->GetStaticTextLenRecursive();
700 return len; 699 return len;
701 } 700 }
702 701
703 } // namespace content 702 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698