-
jhoneycutt@apple.com authored
<rdar://problem/7197644> WebKit should broadcast an MSAA event when jumping to a named anchor https://bugs.webkit.org/show_bug.cgi?id=28899 Reviewed by Adam Roben. WebKitTools: * DumpRenderTree/AccessibilityController.cpp: (logScrollingStartEventsCallback): Turn on logging of scrolling start events. (AccessibilityController::getJSClass): Add a "logScrollingStartEvents" to the AccessibilityController's JS class definition. (AccessibilityController::resetToConsistentState): Turn off logging of scrolling start events. * DumpRenderTree/AccessibilityController.h: Declare setLogScrollingStartEvents(). Add a member for the scrolling start event hook. * DumpRenderTree/mac/AccessibilityControllerMac.cpp: (AccessibilityController::setLogScrollingStartEvents): Stubbed. * DumpRenderTree/win/AccessibilityControllerWin.cpp: (AccessibilityController::AccessibilityController): Initialize the handle to 0. (logEventProc): Renamed from logFocusEventProc; now logs scrolling start events, too. Removed the assertion that the event is a focus event. Added a switch to print a message for focus, scrolling start, and other, unknown events. (AccessibilityController::setLogFocusEvents): Changed to use logEventProc. (AccessibilityController::setLogScrollingStartEvents): If turning logging off, unhook the scrolling start event hook, and clear the member holding the handle. If turning on, query for the root accessible, so that accessibility is enabled for the WebView, and call SetWinEventHook to setup an event hook using logEventProc as the callback function. LayoutTests: * platform/win/accessibility/scroll-to-anchor-expected.txt: Added. * platform/win/accessibility/scroll-to-anchor.html: Added. Turns on scrolling start event logging, then jumps to an anchor at the bottom of the page. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48368 268f45cc-cd09-0410-ab3c-d52691b4dbfc
f1115ef5