| OLD | NEW |
| 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 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 UpdateCachedAttributeValuesIfNeeded(); | 992 UpdateCachedAttributeValuesIfNeeded(); |
| 993 return cached_background_color_; | 993 return cached_background_color_; |
| 994 } | 994 } |
| 995 | 995 |
| 996 AccessibilityOrientation AXObject::Orientation() const { | 996 AccessibilityOrientation AXObject::Orientation() const { |
| 997 // In ARIA 1.1, the default value for aria-orientation changed from | 997 // In ARIA 1.1, the default value for aria-orientation changed from |
| 998 // horizontal to undefined. | 998 // horizontal to undefined. |
| 999 return kAccessibilityOrientationUndefined; | 999 return kAccessibilityOrientationUndefined; |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 AXSupportedAction AXObject::Action() const { | 1002 AXDefaultActionVerb AXObject::Action() const { |
| 1003 if (!ActionElement()) | 1003 if (!ActionElement()) |
| 1004 return AXSupportedAction::kNone; | 1004 return AXDefaultActionVerb::kNone; |
| 1005 | 1005 |
| 1006 switch (RoleValue()) { | 1006 switch (RoleValue()) { |
| 1007 case kButtonRole: | 1007 case kButtonRole: |
| 1008 case kToggleButtonRole: | 1008 case kToggleButtonRole: |
| 1009 return AXSupportedAction::kPress; | 1009 return AXDefaultActionVerb::kPress; |
| 1010 case kTextFieldRole: | 1010 case kTextFieldRole: |
| 1011 return AXSupportedAction::kActivate; | 1011 return AXDefaultActionVerb::kActivate; |
| 1012 case kRadioButtonRole: | 1012 case kRadioButtonRole: |
| 1013 return AXSupportedAction::kSelect; | 1013 return AXDefaultActionVerb::kSelect; |
| 1014 case kCheckBoxRole: | 1014 case kCheckBoxRole: |
| 1015 case kSwitchRole: | 1015 case kSwitchRole: |
| 1016 return CheckedState() == kButtonStateOff ? AXSupportedAction::kCheck | 1016 return CheckedState() == kButtonStateOff ? AXDefaultActionVerb::kCheck |
| 1017 : AXSupportedAction::kUncheck; | 1017 : AXDefaultActionVerb::kUncheck; |
| 1018 case kLinkRole: | 1018 case kLinkRole: |
| 1019 return AXSupportedAction::kJump; | 1019 return AXDefaultActionVerb::kJump; |
| 1020 case kPopUpButtonRole: | 1020 case kPopUpButtonRole: |
| 1021 return AXSupportedAction::kOpen; | 1021 return AXDefaultActionVerb::kOpen; |
| 1022 default: | 1022 default: |
| 1023 return AXSupportedAction::kClick; | 1023 return AXDefaultActionVerb::kClick; |
| 1024 } | 1024 } |
| 1025 } | 1025 } |
| 1026 | 1026 |
| 1027 bool AXObject::IsMultiline() const { | 1027 bool AXObject::IsMultiline() const { |
| 1028 Node* node = this->GetNode(); | 1028 Node* node = this->GetNode(); |
| 1029 if (!node) | 1029 if (!node) |
| 1030 return false; | 1030 return false; |
| 1031 | 1031 |
| 1032 if (isHTMLTextAreaElement(*node)) | 1032 if (isHTMLTextAreaElement(*node)) |
| 1033 return true; | 1033 return true; |
| (...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 } | 1862 } |
| 1863 | 1863 |
| 1864 DEFINE_TRACE(AXObject) { | 1864 DEFINE_TRACE(AXObject) { |
| 1865 visitor->Trace(children_); | 1865 visitor->Trace(children_); |
| 1866 visitor->Trace(parent_); | 1866 visitor->Trace(parent_); |
| 1867 visitor->Trace(cached_live_region_root_); | 1867 visitor->Trace(cached_live_region_root_); |
| 1868 visitor->Trace(ax_object_cache_); | 1868 visitor->Trace(ax_object_cache_); |
| 1869 } | 1869 } |
| 1870 | 1870 |
| 1871 } // namespace blink | 1871 } // namespace blink |
| OLD | NEW |