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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 bool BrowserAccessibility::IsWebAreaForPresentationalIframe() const { | 692 bool BrowserAccessibility::IsWebAreaForPresentationalIframe() const { |
693 if (GetRole() != ui::AX_ROLE_WEB_AREA && | 693 if (GetRole() != ui::AX_ROLE_WEB_AREA && |
694 GetRole() != ui::AX_ROLE_ROOT_WEB_AREA) { | 694 GetRole() != ui::AX_ROLE_ROOT_WEB_AREA) { |
695 return false; | 695 return false; |
696 } | 696 } |
697 | 697 |
698 BrowserAccessibility* parent = GetParent(); | 698 BrowserAccessibility* parent = GetParent(); |
699 if (!parent) | 699 if (!parent) |
700 return false; | 700 return false; |
701 | 701 |
702 BrowserAccessibility* grandparent = parent->GetParent(); | 702 return parent->GetRole() == ui::AX_ROLE_IFRAME_PRESENTATIONAL; |
703 if (!grandparent) | |
704 return false; | |
705 | |
706 return grandparent->GetRole() == ui::AX_ROLE_IFRAME_PRESENTATIONAL; | |
707 } | 703 } |
708 | 704 |
709 bool BrowserAccessibility::IsControl() const { | 705 bool BrowserAccessibility::IsControl() const { |
710 switch (GetRole()) { | 706 switch (GetRole()) { |
711 case ui::AX_ROLE_BUTTON: | 707 case ui::AX_ROLE_BUTTON: |
712 case ui::AX_ROLE_BUTTON_DROP_DOWN: | 708 case ui::AX_ROLE_BUTTON_DROP_DOWN: |
713 case ui::AX_ROLE_CHECK_BOX: | 709 case ui::AX_ROLE_CHECK_BOX: |
714 case ui::AX_ROLE_COLOR_WELL: | 710 case ui::AX_ROLE_COLOR_WELL: |
715 case ui::AX_ROLE_COMBO_BOX: | 711 case ui::AX_ROLE_COMBO_BOX: |
716 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: | 712 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 } | 849 } |
854 need_to_offset_web_area = true; | 850 need_to_offset_web_area = true; |
855 } | 851 } |
856 parent = parent->GetParent(); | 852 parent = parent->GetParent(); |
857 } | 853 } |
858 | 854 |
859 return bounds; | 855 return bounds; |
860 } | 856 } |
861 | 857 |
862 } // namespace content | 858 } // namespace content |
OLD | NEW |