OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014, Google Inc. All rights reserved. | 2 * Copyright (C) 2014, 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 | 255 |
256 return m_objects.at(axID); | 256 return m_objects.at(axID); |
257 } | 257 } |
258 | 258 |
259 // FIXME: This probably belongs on Node. | 259 // FIXME: This probably belongs on Node. |
260 // FIXME: This should take a const char*, but one caller passes nullAtom. | 260 // FIXME: This should take a const char*, but one caller passes nullAtom. |
261 bool nodeHasRole(Node* node, const String& role) { | 261 bool nodeHasRole(Node* node, const String& role) { |
262 if (!node || !node->isElementNode()) | 262 if (!node || !node->isElementNode()) |
263 return false; | 263 return false; |
264 | 264 |
265 return equalIgnoringCase(toElement(node)->getAttribute(roleAttr), role); | 265 return equalIgnoringASCIICase(toElement(node)->getAttribute(roleAttr), role); |
266 } | 266 } |
267 | 267 |
268 AXObject* AXObjectCacheImpl::createFromRenderer(LayoutObject* layoutObject) { | 268 AXObject* AXObjectCacheImpl::createFromRenderer(LayoutObject* layoutObject) { |
269 // FIXME: How could layoutObject->node() ever not be an Element? | 269 // FIXME: How could layoutObject->node() ever not be an Element? |
270 Node* node = layoutObject->node(); | 270 Node* node = layoutObject->node(); |
271 | 271 |
272 // If the node is aria role="list" or the aria role is empty and its a | 272 // If the node is aria role="list" or the aria role is empty and its a |
273 // ul/ol/dl type (it shouldn't be a list if aria says otherwise). | 273 // ul/ol/dl type (it shouldn't be a list if aria says otherwise). |
274 if (nodeHasRole(node, "list") || nodeHasRole(node, "directory") || | 274 if (nodeHasRole(node, "list") || nodeHasRole(node, "directory") || |
275 (nodeHasRole(node, nullAtom) && | 275 (nodeHasRole(node, nullAtom) && |
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 return axObject && axObject->isTextControl(); | 1083 return axObject && axObject->isTextControl(); |
1084 } | 1084 } |
1085 | 1085 |
1086 bool isNodeAriaVisible(Node* node) { | 1086 bool isNodeAriaVisible(Node* node) { |
1087 if (!node) | 1087 if (!node) |
1088 return false; | 1088 return false; |
1089 | 1089 |
1090 if (!node->isElementNode()) | 1090 if (!node->isElementNode()) |
1091 return false; | 1091 return false; |
1092 | 1092 |
1093 return equalIgnoringCase(toElement(node)->getAttribute(aria_hiddenAttr), | 1093 return equalIgnoringASCIICase(toElement(node)->getAttribute(aria_hiddenAttr), |
1094 "false"); | 1094 "false"); |
1095 } | 1095 } |
1096 | 1096 |
1097 void AXObjectCacheImpl::postPlatformNotification(AXObject* obj, | 1097 void AXObjectCacheImpl::postPlatformNotification(AXObject* obj, |
1098 AXNotification notification) { | 1098 AXNotification notification) { |
1099 if (!obj || !obj->getDocument() || !obj->documentFrameView() || | 1099 if (!obj || !obj->getDocument() || !obj->documentFrameView() || |
1100 !obj->documentFrameView()->frame().page()) | 1100 !obj->documentFrameView()->frame().page()) |
1101 return; | 1101 return; |
1102 | 1102 |
1103 ChromeClient& client = | 1103 ChromeClient& client = |
1104 obj->getDocument()->axObjectCacheOwner().page()->chromeClient(); | 1104 obj->getDocument()->axObjectCacheOwner().page()->chromeClient(); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 visitor->trace(m_document); | 1243 visitor->trace(m_document); |
1244 visitor->trace(m_nodeObjectMapping); | 1244 visitor->trace(m_nodeObjectMapping); |
1245 | 1245 |
1246 visitor->trace(m_objects); | 1246 visitor->trace(m_objects); |
1247 visitor->trace(m_notificationsToPost); | 1247 visitor->trace(m_notificationsToPost); |
1248 | 1248 |
1249 AXObjectCache::trace(visitor); | 1249 AXObjectCache::trace(visitor); |
1250 } | 1250 } |
1251 | 1251 |
1252 } // namespace blink | 1252 } // namespace blink |
OLD | NEW |