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

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: 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
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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 bool BrowserAccessibility::IsWebAreaForPresentationalIframe() const { 695 bool BrowserAccessibility::IsWebAreaForPresentationalIframe() const {
696 if (GetRole() != ui::AX_ROLE_WEB_AREA && 696 if (GetRole() != ui::AX_ROLE_WEB_AREA &&
697 GetRole() != ui::AX_ROLE_ROOT_WEB_AREA) { 697 GetRole() != ui::AX_ROLE_ROOT_WEB_AREA) {
698 return false; 698 return false;
699 } 699 }
700 700
701 BrowserAccessibility* parent = GetParent(); 701 BrowserAccessibility* parent = GetParent();
702 if (!parent) 702 if (!parent)
703 return false; 703 return false;
704 704
705 BrowserAccessibility* grandparent = parent->GetParent(); 705 return parent->GetRole() == ui::AX_ROLE_IFRAME_PRESENTATIONAL;
706 if (!grandparent)
707 return false;
708
709 return grandparent->GetRole() == ui::AX_ROLE_IFRAME_PRESENTATIONAL;
710 } 706 }
711 707
712 bool BrowserAccessibility::IsControl() const { 708 bool BrowserAccessibility::IsControl() const {
713 switch (GetRole()) { 709 switch (GetRole()) {
714 case ui::AX_ROLE_BUTTON: 710 case ui::AX_ROLE_BUTTON:
715 case ui::AX_ROLE_BUTTON_DROP_DOWN: 711 case ui::AX_ROLE_BUTTON_DROP_DOWN:
716 case ui::AX_ROLE_CHECK_BOX: 712 case ui::AX_ROLE_CHECK_BOX:
717 case ui::AX_ROLE_COLOR_WELL: 713 case ui::AX_ROLE_COLOR_WELL:
718 case ui::AX_ROLE_COMBO_BOX: 714 case ui::AX_ROLE_COMBO_BOX:
719 case ui::AX_ROLE_DISCLOSURE_TRIANGLE: 715 case ui::AX_ROLE_DISCLOSURE_TRIANGLE:
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 } 852 }
857 need_to_offset_web_area = true; 853 need_to_offset_web_area = true;
858 } 854 }
859 parent = parent->GetParent(); 855 parent = parent->GetParent();
860 } 856 }
861 857
862 return bounds; 858 return bounds;
863 } 859 }
864 860
865 } // namespace content 861 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698