OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010 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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
915 // In Chromium, AccessibilityObjects are not wrapped. | 915 // In Chromium, AccessibilityObjects are not wrapped. |
916 } | 916 } |
917 | 917 |
918 void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
ation notification) | 918 void AXObjectCache::postPlatformNotification(AccessibilityObject* obj, AXNotific
ation notification) |
919 { | 919 { |
920 if (obj && obj->isAccessibilityScrollbar() && notification == AXValueChanged
) { | 920 if (obj && obj->isAccessibilityScrollbar() && notification == AXValueChanged
) { |
921 // Send document value changed on scrollbar value changed notification. | 921 // Send document value changed on scrollbar value changed notification. |
922 Scrollbar* scrollBar = static_cast<AccessibilityScrollbar*>(obj)->scroll
bar(); | 922 Scrollbar* scrollBar = static_cast<AccessibilityScrollbar*>(obj)->scroll
bar(); |
923 if (!scrollBar || !scrollBar->parent() || !scrollBar->parent()->isFrameV
iew()) | 923 if (!scrollBar || !scrollBar->parent() || !scrollBar->parent()->isFrameV
iew()) |
924 return; | 924 return; |
925 Document* document = toFrameView(scrollBar->parent())->frame()->document
(); | 925 Document* document = toFrameView(scrollBar->parent())->frame().document(
); |
926 if (document != document->topDocument()) | 926 if (document != document->topDocument()) |
927 return; | 927 return; |
928 obj = get(document->renderer()); | 928 obj = get(document->renderer()); |
929 } | 929 } |
930 | 930 |
931 if (!obj || !obj->document() || !obj->documentFrameView() || !obj->documentF
rameView()->frame() || !obj->documentFrameView()->frame()->page()) | 931 if (!obj || !obj->document() || !obj->documentFrameView() || !obj->documentF
rameView()->frame().page()) |
932 return; | 932 return; |
933 | 933 |
934 ChromeClient& client = obj->documentFrameView()->frame()->page()->chrome().c
lient(); | 934 ChromeClient& client = obj->documentFrameView()->frame().page()->chrome().cl
ient(); |
935 | 935 |
936 if (notification == AXActiveDescendantChanged | 936 if (notification == AXActiveDescendantChanged |
937 && obj->document()->focusedElement() | 937 && obj->document()->focusedElement() |
938 && obj->node() == obj->document()->focusedElement()) { | 938 && obj->node() == obj->document()->focusedElement()) { |
939 // Calling handleFocusedUIElementChanged will focus the new active | 939 // Calling handleFocusedUIElementChanged will focus the new active |
940 // descendant and send the AXFocusedUIElementChanged notification. | 940 // descendant and send the AXFocusedUIElementChanged notification. |
941 handleFocusedUIElementChanged(0, obj->document()->focusedElement()); | 941 handleFocusedUIElementChanged(0, obj->document()->focusedElement()); |
942 } | 942 } |
943 | 943 |
944 client.postAccessibilityNotification(obj, notification); | 944 client.postAccessibilityNotification(obj, notification); |
(...skipping 18 matching lines...) Expand all Loading... |
963 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) | 963 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) |
964 { | 964 { |
965 // The anchor node may not be accessible. Post the notification for the | 965 // The anchor node may not be accessible. Post the notification for the |
966 // first accessible object. | 966 // first accessible object. |
967 postPlatformNotification(AccessibilityObject::firstAccessibleObjectFromNode(
anchorNode), AXScrolledToAnchor); | 967 postPlatformNotification(AccessibilityObject::firstAccessibleObjectFromNode(
anchorNode), AXScrolledToAnchor); |
968 } | 968 } |
969 | 969 |
970 } // namespace WebCore | 970 } // namespace WebCore |
971 | 971 |
972 #endif // HAVE(ACCESSIBILITY) | 972 #endif // HAVE(ACCESSIBILITY) |
OLD | NEW |