| 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 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 bool AXNodeObject::canSetFocusAttribute() const | 1096 bool AXNodeObject::canSetFocusAttribute() const |
| 1097 { | 1097 { |
| 1098 Node* node = getNode(); | 1098 Node* node = getNode(); |
| 1099 if (!node) | 1099 if (!node) |
| 1100 return false; | 1100 return false; |
| 1101 | 1101 |
| 1102 if (isWebArea()) | 1102 if (isWebArea()) |
| 1103 return true; | 1103 return true; |
| 1104 | 1104 |
| 1105 // Children of elements with an aria-activedescendant attribute should be | 1105 // Children of elements with an aria-activedescendant attribute should be |
| 1106 // focusable if they have an ARIA role. | 1106 // focusable if they have a (non-presentational) ARIA role. |
| 1107 if (ariaRoleAttribute() != UnknownRole && ancestorExposesActiveDescendant()) | 1107 if (!isPresentational() && ariaRoleAttribute() != UnknownRole && ancestorExp
osesActiveDescendant()) |
| 1108 return true; | 1108 return true; |
| 1109 | 1109 |
| 1110 // NOTE: It would be more accurate to ask the document whether setFocusedNod
e() would | 1110 // NOTE: It would be more accurate to ask the document whether setFocusedNod
e() would |
| 1111 // do anything. For example, setFocusedNode() will do nothing if the current
focused | 1111 // do anything. For example, setFocusedNode() will do nothing if the current
focused |
| 1112 // node will not relinquish the focus. | 1112 // node will not relinquish the focus. |
| 1113 if (isDisabledFormControl(node)) | 1113 if (isDisabledFormControl(node)) |
| 1114 return false; | 1114 return false; |
| 1115 | 1115 |
| 1116 return node->isElementNode() && toElement(node)->supportsFocus(); | 1116 return node->isElementNode() && toElement(node)->supportsFocus(); |
| 1117 } | 1117 } |
| (...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2894 return placeholder; | 2894 return placeholder; |
| 2895 } | 2895 } |
| 2896 | 2896 |
| 2897 DEFINE_TRACE(AXNodeObject) | 2897 DEFINE_TRACE(AXNodeObject) |
| 2898 { | 2898 { |
| 2899 visitor->trace(m_node); | 2899 visitor->trace(m_node); |
| 2900 AXObject::trace(visitor); | 2900 AXObject::trace(visitor); |
| 2901 } | 2901 } |
| 2902 | 2902 |
| 2903 } // namespace blink | 2903 } // namespace blink |
| OLD | NEW |