| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, Google 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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 | 1040 |
| 1041 bool AXNodeObject::IsMenuButton() const { | 1041 bool AXNodeObject::IsMenuButton() const { |
| 1042 return RoleValue() == kMenuButtonRole; | 1042 return RoleValue() == kMenuButtonRole; |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 bool AXNodeObject::IsMeter() const { | 1045 bool AXNodeObject::IsMeter() const { |
| 1046 return RoleValue() == kMeterRole; | 1046 return RoleValue() == kMeterRole; |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 bool AXNodeObject::IsMultiSelectable() const { | 1049 bool AXNodeObject::IsMultiSelectable() const { |
| 1050 bool multiselectable = false; | 1050 switch (RoleValue()) { |
| 1051 if (HasAOMPropertyOrARIAAttribute(AOMBooleanProperty::kMultiselectable, | 1051 case kGridRole: |
| 1052 multiselectable)) { | 1052 case kTreeGridRole: |
| 1053 return multiselectable; | 1053 case kTreeRole: |
| 1054 case kListBoxRole: |
| 1055 case kTabListRole: { |
| 1056 bool multiselectable = false; |
| 1057 if (HasAOMPropertyOrARIAAttribute(AOMBooleanProperty::kMultiselectable, |
| 1058 multiselectable)) { |
| 1059 return multiselectable; |
| 1060 } |
| 1061 } |
| 1062 default: |
| 1063 break; |
| 1054 } | 1064 } |
| 1055 | 1065 |
| 1056 return isHTMLSelectElement(GetNode()) && | 1066 return isHTMLSelectElement(GetNode()) && |
| 1057 toHTMLSelectElement(*GetNode()).IsMultiple(); | 1067 toHTMLSelectElement(*GetNode()).IsMultiple(); |
| 1058 } | 1068 } |
| 1059 | 1069 |
| 1060 bool AXNodeObject::IsNativeCheckboxOrRadio() const { | 1070 bool AXNodeObject::IsNativeCheckboxOrRadio() const { |
| 1061 Node* node = this->GetNode(); | 1071 Node* node = this->GetNode(); |
| 1062 if (!isHTMLInputElement(node)) | 1072 if (!isHTMLInputElement(node)) |
| 1063 return false; | 1073 return false; |
| (...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3226 return String(); | 3236 return String(); |
| 3227 return ToTextControlElement(node)->StrippedPlaceholder(); | 3237 return ToTextControlElement(node)->StrippedPlaceholder(); |
| 3228 } | 3238 } |
| 3229 | 3239 |
| 3230 DEFINE_TRACE(AXNodeObject) { | 3240 DEFINE_TRACE(AXNodeObject) { |
| 3231 visitor->Trace(node_); | 3241 visitor->Trace(node_); |
| 3232 AXObjectImpl::Trace(visitor); | 3242 AXObjectImpl::Trace(visitor); |
| 3233 } | 3243 } |
| 3234 | 3244 |
| 3235 } // namespace blink | 3245 } // namespace blink |
| OLD | NEW |