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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObjectImpl.cpp

Issue 2863703003: A11y: Rename AXSupportedAction to AXDefaultActionVerb. (Closed)
Patch Set: Rebase. Created 3 years, 7 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 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 UpdateCachedAttributeValuesIfNeeded(); 1001 UpdateCachedAttributeValuesIfNeeded();
1002 return cached_background_color_; 1002 return cached_background_color_;
1003 } 1003 }
1004 1004
1005 AccessibilityOrientation AXObjectImpl::Orientation() const { 1005 AccessibilityOrientation AXObjectImpl::Orientation() const {
1006 // In ARIA 1.1, the default value for aria-orientation changed from 1006 // In ARIA 1.1, the default value for aria-orientation changed from
1007 // horizontal to undefined. 1007 // horizontal to undefined.
1008 return kAccessibilityOrientationUndefined; 1008 return kAccessibilityOrientationUndefined;
1009 } 1009 }
1010 1010
1011 AXSupportedAction AXObjectImpl::Action() const { 1011 AXDefaultActionVerb AXObjectImpl::Action() const {
1012 if (!ActionElement()) 1012 if (!ActionElement())
1013 return AXSupportedAction::kNone; 1013 return AXDefaultActionVerb::kNone;
1014 1014
1015 switch (RoleValue()) { 1015 switch (RoleValue()) {
1016 case kButtonRole: 1016 case kButtonRole:
1017 case kToggleButtonRole: 1017 case kToggleButtonRole:
1018 return AXSupportedAction::kPress; 1018 return AXDefaultActionVerb::kPress;
1019 case kTextFieldRole: 1019 case kTextFieldRole:
1020 return AXSupportedAction::kActivate; 1020 return AXDefaultActionVerb::kActivate;
1021 case kRadioButtonRole: 1021 case kRadioButtonRole:
1022 return AXSupportedAction::kSelect; 1022 return AXDefaultActionVerb::kSelect;
1023 case kCheckBoxRole: 1023 case kCheckBoxRole:
1024 case kSwitchRole: 1024 case kSwitchRole:
1025 return CheckedState() == kButtonStateOff ? AXSupportedAction::kCheck 1025 return CheckedState() == kButtonStateOff ? AXDefaultActionVerb::kCheck
1026 : AXSupportedAction::kUncheck; 1026 : AXDefaultActionVerb::kUncheck;
1027 case kLinkRole: 1027 case kLinkRole:
1028 return AXSupportedAction::kJump; 1028 return AXDefaultActionVerb::kJump;
1029 case kPopUpButtonRole: 1029 case kPopUpButtonRole:
1030 return AXSupportedAction::kOpen; 1030 return AXDefaultActionVerb::kOpen;
1031 default: 1031 default:
1032 return AXSupportedAction::kClick; 1032 return AXDefaultActionVerb::kClick;
1033 } 1033 }
1034 } 1034 }
1035 1035
1036 bool AXObjectImpl::IsMultiline() const { 1036 bool AXObjectImpl::IsMultiline() const {
1037 Node* node = this->GetNode(); 1037 Node* node = this->GetNode();
1038 if (!node) 1038 if (!node)
1039 return false; 1039 return false;
1040 1040
1041 if (isHTMLTextAreaElement(*node)) 1041 if (isHTMLTextAreaElement(*node))
1042 return true; 1042 return true;
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 } 1875 }
1876 1876
1877 DEFINE_TRACE(AXObjectImpl) { 1877 DEFINE_TRACE(AXObjectImpl) {
1878 visitor->Trace(children_); 1878 visitor->Trace(children_);
1879 visitor->Trace(parent_); 1879 visitor->Trace(parent_);
1880 visitor->Trace(cached_live_region_root_); 1880 visitor->Trace(cached_live_region_root_);
1881 visitor->Trace(ax_object_cache_); 1881 visitor->Trace(ax_object_cache_);
1882 } 1882 }
1883 1883
1884 } // namespace blink 1884 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObjectImpl.h ('k') | third_party/WebKit/Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698