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 AXObjectCache* cache = node->document()->axObjectCache(); | 508 AXObjectCache* cache = node->document().axObjectCache(); |
509 AccessibilityObject* accessibleObject = cache->getOrCreate(node->renderer())
; | 509 AccessibilityObject* accessibleObject = cache->getOrCreate(node->renderer())
; |
510 while (accessibleObject && accessibleObject->accessibilityIsIgnored()) { | 510 while (accessibleObject && accessibleObject->accessibilityIsIgnored()) { |
511 node = NodeTraversal::next(node); | 511 node = NodeTraversal::next(node); |
512 | 512 |
513 while (node && !node->renderer()) | 513 while (node && !node->renderer()) |
514 node = NodeTraversal::nextSkippingChildren(node); | 514 node = NodeTraversal::nextSkippingChildren(node); |
515 | 515 |
516 if (!node) | 516 if (!node) |
517 return 0; | 517 return 0; |
518 | 518 |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 } | 876 } |
877 | 877 |
878 static bool replacedNodeNeedsCharacter(Node* replacedNode) | 878 static bool replacedNodeNeedsCharacter(Node* replacedNode) |
879 { | 879 { |
880 // we should always be given a rendered node and a replaced node, but be saf
e | 880 // we should always be given a rendered node and a replaced node, but be saf
e |
881 // replaced nodes are either attachments (widgets) or images | 881 // replaced nodes are either attachments (widgets) or images |
882 if (!replacedNode || !replacedNode->renderer() || !replacedNode->renderer()-
>isReplaced() || replacedNode->isTextNode()) | 882 if (!replacedNode || !replacedNode->renderer() || !replacedNode->renderer()-
>isReplaced() || replacedNode->isTextNode()) |
883 return false; | 883 return false; |
884 | 884 |
885 // create an AX object, but skip it if it is not supposed to be seen | 885 // create an AX object, but skip it if it is not supposed to be seen |
886 AccessibilityObject* object = replacedNode->renderer()->document()->axObject
Cache()->getOrCreate(replacedNode); | 886 AccessibilityObject* object = replacedNode->renderer()->document().axObjectC
ache()->getOrCreate(replacedNode); |
887 if (object->accessibilityIsIgnored()) | 887 if (object->accessibilityIsIgnored()) |
888 return false; | 888 return false; |
889 | 889 |
890 return true; | 890 return true; |
891 } | 891 } |
892 | 892 |
893 #if HAVE(ACCESSIBILITY) | 893 #if HAVE(ACCESSIBILITY) |
894 int AccessibilityObject::lineForPosition(const VisiblePosition& visiblePos) cons
t | 894 int AccessibilityObject::lineForPosition(const VisiblePosition& visiblePos) cons
t |
895 { | 895 { |
896 if (visiblePos.isNull() || !node()) | 896 if (visiblePos.isNull() || !node()) |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 | 982 |
983 for (AccessibilityObject* object = parentObject(); object; object = object->
parentObject()) { | 983 for (AccessibilityObject* object = parentObject(); object; object = object->
parentObject()) { |
984 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true")) | 984 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true")) |
985 return true; | 985 return true; |
986 } | 986 } |
987 | 987 |
988 return false; | 988 return false; |
989 } | 989 } |
990 | 990 |
991 } // namespace WebCore | 991 } // namespace WebCore |
OLD | NEW |