| 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 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 return AXDefaultActionVerb::kOpen; | 1155 return AXDefaultActionVerb::kOpen; |
| 1156 default: | 1156 default: |
| 1157 if (IsCheckable()) { | 1157 if (IsCheckable()) { |
| 1158 return CheckedState() != kCheckedStateTrue | 1158 return CheckedState() != kCheckedStateTrue |
| 1159 ? AXDefaultActionVerb::kCheck | 1159 ? AXDefaultActionVerb::kCheck |
| 1160 : AXDefaultActionVerb::kUncheck; | 1160 : AXDefaultActionVerb::kUncheck; |
| 1161 } | 1161 } |
| 1162 return AXDefaultActionVerb::kClick; | 1162 return AXDefaultActionVerb::kClick; |
| 1163 } | 1163 } |
| 1164 } | 1164 } |
| 1165 | |
| 1166 bool AXObject::IsMultiline() const { | |
| 1167 Node* node = this->GetNode(); | |
| 1168 if (!node) | |
| 1169 return false; | |
| 1170 | |
| 1171 if (isHTMLTextAreaElement(*node)) | |
| 1172 return true; | |
| 1173 | |
| 1174 if (HasEditableStyle(*node)) | |
| 1175 return true; | |
| 1176 | |
| 1177 if (!IsNativeTextControl() && !IsNonNativeTextControl()) | |
| 1178 return false; | |
| 1179 | |
| 1180 return AOMPropertyOrARIAAttributeIsTrue(AOMBooleanProperty::kMultiline); | |
| 1181 } | |
| 1182 | |
| 1183 bool AXObject::AriaPressedIsPresent() const { | 1165 bool AXObject::AriaPressedIsPresent() const { |
| 1184 return !GetAttribute(aria_pressedAttr).IsEmpty(); | 1166 return !GetAttribute(aria_pressedAttr).IsEmpty(); |
| 1185 } | 1167 } |
| 1186 | 1168 |
| 1187 bool AXObject::AriaCheckedIsPresent() const { | 1169 bool AXObject::AriaCheckedIsPresent() const { |
| 1188 return !GetAttribute(aria_checkedAttr).IsEmpty(); | 1170 return !GetAttribute(aria_checkedAttr).IsEmpty(); |
| 1189 } | 1171 } |
| 1190 | 1172 |
| 1191 bool AXObject::SupportsActiveDescendant() const { | 1173 bool AXObject::SupportsActiveDescendant() const { |
| 1192 // According to the ARIA Spec, all ARIA composite widgets, ARIA text boxes | 1174 // According to the ARIA Spec, all ARIA composite widgets, ARIA text boxes |
| (...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2100 } | 2082 } |
| 2101 | 2083 |
| 2102 DEFINE_TRACE(AXObject) { | 2084 DEFINE_TRACE(AXObject) { |
| 2103 visitor->Trace(children_); | 2085 visitor->Trace(children_); |
| 2104 visitor->Trace(parent_); | 2086 visitor->Trace(parent_); |
| 2105 visitor->Trace(cached_live_region_root_); | 2087 visitor->Trace(cached_live_region_root_); |
| 2106 visitor->Trace(ax_object_cache_); | 2088 visitor->Trace(ax_object_cache_); |
| 2107 } | 2089 } |
| 2108 | 2090 |
| 2109 } // namespace blink | 2091 } // namespace blink |
| OLD | NEW |