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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 } | 498 } |
499 | 499 |
500 return parent; | 500 return parent; |
501 } | 501 } |
502 | 502 |
503 AccessibilityObject* AccessibilityObject::firstAccessibleObjectFromNode(const No
de* node) | 503 AccessibilityObject* AccessibilityObject::firstAccessibleObjectFromNode(const No
de* node) |
504 { | 504 { |
505 if (!node) | 505 if (!node) |
506 return 0; | 506 return 0; |
507 | 507 |
508 Document* document = node->document(); | 508 AXObjectCache* cache = node->document()->axObjectCache(); |
509 if (!document) | |
510 return 0; | |
511 | |
512 AXObjectCache* cache = document->axObjectCache(); | |
513 | |
514 AccessibilityObject* accessibleObject = cache->getOrCreate(node->renderer())
; | 509 AccessibilityObject* accessibleObject = cache->getOrCreate(node->renderer())
; |
515 while (accessibleObject && accessibleObject->accessibilityIsIgnored()) { | 510 while (accessibleObject && accessibleObject->accessibilityIsIgnored()) { |
516 node = NodeTraversal::next(node); | 511 node = NodeTraversal::next(node); |
517 | 512 |
518 while (node && !node->renderer()) | 513 while (node && !node->renderer()) |
519 node = NodeTraversal::nextSkippingChildren(node); | 514 node = NodeTraversal::nextSkippingChildren(node); |
520 | 515 |
521 if (!node) | 516 if (!node) |
522 return 0; | 517 return 0; |
523 | 518 |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 | 982 |
988 for (AccessibilityObject* object = parentObject(); object; object = object->
parentObject()) { | 983 for (AccessibilityObject* object = parentObject(); object; object = object->
parentObject()) { |
989 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true")) | 984 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true")) |
990 return true; | 985 return true; |
991 } | 986 } |
992 | 987 |
993 return false; | 988 return false; |
994 } | 989 } |
995 | 990 |
996 } // namespace WebCore | 991 } // namespace WebCore |
OLD | NEW |