| 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 if (input.isTextField()) | 1040 if (input.isTextField()) |
| 1041 return input.isReadOnly(); | 1041 return input.isReadOnly(); |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 return !node->hasEditableStyle(); | 1044 return !node->hasEditableStyle(); |
| 1045 } | 1045 } |
| 1046 | 1046 |
| 1047 bool AXNodeObject::isRequired() const | 1047 bool AXNodeObject::isRequired() const |
| 1048 { | 1048 { |
| 1049 Node* n = this->node(); | 1049 Node* n = this->node(); |
| 1050 if (n && (n->isElementNode() && toElement(n)->isFormControlElement())) | 1050 if (n && (n->isElementNode() && toElement(n)->isFormControlElement()) && has
Attribute(requiredAttr)) |
| 1051 return toHTMLFormControlElement(n)->isRequired(); | 1051 return toHTMLFormControlElement(n)->isRequired(); |
| 1052 | 1052 |
| 1053 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true")) | 1053 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true")) |
| 1054 return true; | 1054 return true; |
| 1055 | 1055 |
| 1056 return false; | 1056 return false; |
| 1057 } | 1057 } |
| 1058 | 1058 |
| 1059 bool AXNodeObject::canSetFocusAttribute() const | 1059 bool AXNodeObject::canSetFocusAttribute() const |
| 1060 { | 1060 { |
| (...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2331 ariaLabeledByElements(elements); | 2331 ariaLabeledByElements(elements); |
| 2332 | 2332 |
| 2333 for (const auto& element : elements) { | 2333 for (const auto& element : elements) { |
| 2334 RefPtr<AXObject> axElement = axObjectCache()->getOrCreate(element); | 2334 RefPtr<AXObject> axElement = axObjectCache()->getOrCreate(element); |
| 2335 textOrder.append(AccessibilityText(ariaLabeledBy, AlternativeText, a
xElement)); | 2335 textOrder.append(AccessibilityText(ariaLabeledBy, AlternativeText, a
xElement)); |
| 2336 } | 2336 } |
| 2337 } | 2337 } |
| 2338 } | 2338 } |
| 2339 | 2339 |
| 2340 } // namespace blink | 2340 } // namespace blink |
| OLD | NEW |