| 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 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 postPlatformNotification(focusedObject, AXFocusedUIElementChanged); | 1029 postPlatformNotification(focusedObject, AXFocusedUIElementChanged); |
| 1030 } | 1030 } |
| 1031 | 1031 |
| 1032 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) | 1032 void AXObjectCache::handleScrolledToAnchor(const Node* anchorNode) |
| 1033 { | 1033 { |
| 1034 // The anchor node may not be accessible. Post the notification for the | 1034 // The anchor node may not be accessible. Post the notification for the |
| 1035 // first accessible object. | 1035 // first accessible object. |
| 1036 postPlatformNotification(AXObject::firstAccessibleObjectFromNode(anchorNode)
, AXScrolledToAnchor); | 1036 postPlatformNotification(AXObject::firstAccessibleObjectFromNode(anchorNode)
, AXScrolledToAnchor); |
| 1037 } | 1037 } |
| 1038 | 1038 |
| 1039 void AXObjectCache::handleScrollPositionChanged(FrameView* scrollView) | 1039 void AXObjectCache::handleScrollPositionChanged(FrameView* frameView) |
| 1040 { | 1040 { |
| 1041 postPlatformNotification(getOrCreate(scrollView), AXScrollPositionChanged); | 1041 // Prefer to fire the scroll position changed event on the frame view's chil
d web area, if possible. |
| 1042 AXObject* targetAXObject = getOrCreate(frameView); |
| 1043 if (targetAXObject && !targetAXObject->children().isEmpty()) |
| 1044 targetAXObject = targetAXObject->children()[0].get(); |
| 1045 postPlatformNotification(targetAXObject, AXScrollPositionChanged); |
| 1042 } | 1046 } |
| 1043 | 1047 |
| 1044 void AXObjectCache::handleScrollPositionChanged(RenderObject* renderObject) | 1048 void AXObjectCache::handleScrollPositionChanged(RenderObject* renderObject) |
| 1045 { | 1049 { |
| 1046 postPlatformNotification(getOrCreate(renderObject), AXScrollPositionChanged)
; | 1050 postPlatformNotification(getOrCreate(renderObject), AXScrollPositionChanged)
; |
| 1047 } | 1051 } |
| 1048 | 1052 |
| 1049 void AXObjectCache::setCanvasObjectBounds(Element* element, const LayoutRect& re
ct) | 1053 void AXObjectCache::setCanvasObjectBounds(Element* element, const LayoutRect& re
ct) |
| 1050 { | 1054 { |
| 1051 AXObject* obj = getOrCreate(element); | 1055 AXObject* obj = getOrCreate(element); |
| 1052 if (!obj) | 1056 if (!obj) |
| 1053 return; | 1057 return; |
| 1054 | 1058 |
| 1055 obj->setElementRect(rect); | 1059 obj->setElementRect(rect); |
| 1056 } | 1060 } |
| 1057 | 1061 |
| 1058 } // namespace blink | 1062 } // namespace blink |
| OLD | NEW |