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

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

Issue 1564863002: Get rid of AXScrollView and AXScrollbar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dump_oopif_3
Patch Set: Fix Android expectation Created 4 years, 11 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/renderer/accessibility/renderer_accessibility_browsertest.cc » ('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 <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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/renderer/accessibility/renderer_accessibility_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698