Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: Source/core/accessibility/AXObjectCache.cpp

Issue 662913002: Fire accessible event on web area object when scrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@scroll_again
Patch Set: Update tests based on change Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/accessibility/scroll-window-sends-notification-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « LayoutTests/accessibility/scroll-window-sends-notification-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698