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

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

Issue 1337643002: Made combo boxes into leaf nodes in all platform-specific accessibility trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test expectations. Created 5 years, 3 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/test/data/accessibility/aria/aria-autocomplete-expected-win.txt » ('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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 bool BrowserAccessibility::PlatformIsLeaf() const { 45 bool BrowserAccessibility::PlatformIsLeaf() const {
46 if (InternalChildCount() == 0) 46 if (InternalChildCount() == 0)
47 return true; 47 return true;
48 48
49 // All of these roles may have children that we use as internal 49 // All of these roles may have children that we use as internal
50 // implementation details, but we want to expose them as leaves 50 // implementation details, but we want to expose them as leaves
51 // to platform accessibility APIs. 51 // to platform accessibility APIs.
52 switch (GetRole()) { 52 switch (GetRole()) {
53 case ui::AX_ROLE_COMBO_BOX:
53 case ui::AX_ROLE_LINE_BREAK: 54 case ui::AX_ROLE_LINE_BREAK:
54 case ui::AX_ROLE_SLIDER: 55 case ui::AX_ROLE_SLIDER:
55 case ui::AX_ROLE_STATIC_TEXT: 56 case ui::AX_ROLE_STATIC_TEXT:
56 case ui::AX_ROLE_TEXT_FIELD: 57 case ui::AX_ROLE_TEXT_FIELD:
57 return true; 58 return true;
58 default: 59 default:
59 return false; 60 return false;
60 } 61 }
61 } 62 }
62 63
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 776 }
776 need_to_offset_web_area = true; 777 need_to_offset_web_area = true;
777 } 778 }
778 parent = parent->GetParent(); 779 parent = parent->GetParent();
779 } 780 }
780 781
781 return bounds; 782 return bounds;
782 } 783 }
783 784
784 } // namespace content 785 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/accessibility/aria/aria-autocomplete-expected-win.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698