OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |