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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
677 if (EqualsASCII(value, "mixed")) | 677 if (EqualsASCII(value, "mixed")) |
678 *is_mixed = true; | 678 *is_mixed = true; |
679 | 679 |
680 return false; // Not set | 680 return false; // Not set |
681 } | 681 } |
682 | 682 |
683 bool BrowserAccessibility::HasState(ui::AXState state_enum) const { | 683 bool BrowserAccessibility::HasState(ui::AXState state_enum) const { |
684 return (GetState() >> state_enum) & 1; | 684 return (GetState() >> state_enum) & 1; |
685 } | 685 } |
686 | 686 |
687 bool BrowserAccessibility::IsCellOrTableHeaderRole() const { | 687 bool BrowserAccessibility::IsCellOrTableHeaderRole(int32 role) const { |
dmazzoni
2015/03/11 16:31:41
I don't think it's necessary to add this argument
| |
688 return (GetRole() == ui::AX_ROLE_CELL || | 688 return (role == ui::AX_ROLE_CELL || |
689 GetRole() == ui::AX_ROLE_COLUMN_HEADER || | 689 role == ui::AX_ROLE_COLUMN_HEADER || |
690 GetRole() == ui::AX_ROLE_ROW_HEADER); | 690 role == ui::AX_ROLE_ROW_HEADER); |
691 } | 691 } |
692 | 692 |
693 bool BrowserAccessibility::IsEditableText() const { | 693 bool BrowserAccessibility::IsEditableText() const { |
694 // These roles don't have readonly set, but they're not editable text. | 694 // These roles don't have readonly set, but they're not editable text. |
695 if (GetRole() == ui::AX_ROLE_SCROLL_AREA || | 695 if (GetRole() == ui::AX_ROLE_SCROLL_AREA || |
696 GetRole() == ui::AX_ROLE_COLUMN || | 696 GetRole() == ui::AX_ROLE_COLUMN || |
697 GetRole() == ui::AX_ROLE_TABLE_HEADER_CONTAINER) { | 697 GetRole() == ui::AX_ROLE_TABLE_HEADER_CONTAINER) { |
698 return false; | 698 return false; |
699 } | 699 } |
700 | 700 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
781 } | 781 } |
782 need_to_offset_web_area = true; | 782 need_to_offset_web_area = true; |
783 } | 783 } |
784 parent = parent->GetParentForBoundsCalculation(); | 784 parent = parent->GetParentForBoundsCalculation(); |
785 } | 785 } |
786 | 786 |
787 return bounds; | 787 return bounds; |
788 } | 788 } |
789 | 789 |
790 } // namespace content | 790 } // namespace content |
OLD | NEW |