Changeset 48368 in webkit
- Timestamp:
- Sep 14, 2009 2:25:24 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r48363 r48368 1 2009-09-11 Jon Honeycutt <jhoneycutt@apple.com> 2 3 DRT/test part of 4 <rdar://problem/7197644> WebKit should broadcast an MSAA event when 5 jumping to a named anchor 6 7 https://bugs.webkit.org/show_bug.cgi?id=28899 8 9 Reviewed by Adam Roben. 10 11 * platform/win/accessibility/scroll-to-anchor-expected.txt: Added. 12 * platform/win/accessibility/scroll-to-anchor.html: 13 Added. Turns on scrolling start event logging, then jumps to an 14 anchor at the bottom of the page. 15 1 16 2009-09-14 Brady Eidson <beidson@apple.com> 2 17 -
trunk/WebKitTools/ChangeLog
r48365 r48368 1 2009-09-11 Jon Honeycutt <jhoneycutt@apple.com> 2 3 DRT/test part of 4 <rdar://problem/7197644> WebKit should broadcast an MSAA event when 5 jumping to a named anchor 6 7 https://bugs.webkit.org/show_bug.cgi?id=28899 8 9 Reviewed by Adam Roben. 10 11 * DumpRenderTree/AccessibilityController.cpp: 12 (logScrollingStartEventsCallback): 13 Turn on logging of scrolling start events. 14 (AccessibilityController::getJSClass): 15 Add a "logScrollingStartEvents" to the AccessibilityController's JS 16 class definition. 17 (AccessibilityController::resetToConsistentState): 18 Turn off logging of scrolling start events. 19 20 * DumpRenderTree/AccessibilityController.h: 21 Declare setLogScrollingStartEvents(). Add a member for the scrolling 22 start event hook. 23 24 * DumpRenderTree/mac/AccessibilityControllerMac.cpp: 25 (AccessibilityController::setLogScrollingStartEvents): 26 Stubbed. 27 28 * DumpRenderTree/win/AccessibilityControllerWin.cpp: 29 (AccessibilityController::AccessibilityController): 30 Initialize the handle to 0. 31 (logEventProc): 32 Renamed from logFocusEventProc; now logs scrolling start events, too. 33 Removed the assertion that the event is a focus event. Added a switch 34 to print a message for focus, scrolling start, and other, unknown 35 events. 36 (AccessibilityController::setLogFocusEvents): 37 Changed to use logEventProc. 38 (AccessibilityController::setLogScrollingStartEvents): 39 If turning logging off, unhook the scrolling start event hook, and clear 40 the member holding the handle. If turning on, query for the root 41 accessible, so that accessibility is enabled for the WebView, and call 42 SetWinEventHook to setup an event hook using logEventProc as the 43 callback function. 44 1 45 2009-09-14 Brady Eidson <beidson@apple.com> 2 46 -
trunk/WebKitTools/DumpRenderTree/AccessibilityController.cpp
r47320 r48368 60 60 } 61 61 62 static JSValueRef logScrollingStartEventsCallback(JSContextRef ctx, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*) 63 { 64 AccessibilityController* controller = static_cast<AccessibilityController*>(JSObjectGetPrivate(thisObject)); 65 controller->setLogScrollingStartEvents(true); 66 return JSValueMakeUndefined(ctx); 67 } 68 62 69 JSClassRef AccessibilityController::getJSClass() 63 70 { 64 71 static JSStaticFunction staticFunctions[] = { 65 72 { "logFocusEvents", logFocusEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 73 { "logScrollingStartEvents", logScrollingStartEventsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 66 74 { 0, 0, 0 } 67 75 }; … … 85 93 { 86 94 setLogFocusEvents(false); 95 setLogScrollingStartEvents(false); 87 96 } -
trunk/WebKitTools/DumpRenderTree/AccessibilityController.h
r47320 r48368 46 46 47 47 void setLogFocusEvents(bool); 48 void setLogScrollingStartEvents(bool); 48 49 49 50 void resetToConsistentState(); … … 54 55 #if PLATFORM(WIN) 55 56 HWINEVENTHOOK m_focusEventHook; 57 HWINEVENTHOOK m_scrollingStartEventHook; 56 58 #endif 57 59 }; -
trunk/WebKitTools/DumpRenderTree/mac/AccessibilityControllerMac.mm
r47320 r48368 58 58 { 59 59 } 60 61 void AccessibilityController::setLogScrollingStartEvents(bool) 62 { 63 } 64 -
trunk/WebKitTools/DumpRenderTree/win/AccessibilityControllerWin.cpp
r47320 r48368 39 39 AccessibilityController::AccessibilityController() 40 40 : m_focusEventHook(0) 41 , m_scrollingStartEventHook(0) 41 42 { 42 43 } … … 89 90 } 90 91 91 static void CALLBACK log FocusEventProc(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD, DWORD)92 static void CALLBACK logEventProc(HWINEVENTHOOK hWinEventHook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD, DWORD) 92 93 { 93 ASSERT_ARG(event, event == EVENT_OBJECT_FOCUS);94 95 94 // Get the accessible object for this event. 96 95 COMPtr<IAccessible> parentObject; … … 109 108 SysFreeString(nameBSTR); 110 109 111 printf("Received focus event for object '%S'.\n", name.c_str()); 110 switch (event) { 111 case EVENT_OBJECT_FOCUS: 112 printf("Received focus event for object '%S'.\n", name.c_str()); 113 break; 114 115 case EVENT_SYSTEM_SCROLLINGSTART: 116 printf("Received scrolling start event for object '%S'.\n", name.c_str()); 117 break; 118 119 default: 120 printf("Received unknown event for object '%S'.\n", name.c_str()); 121 break; 122 } 112 123 } 113 124 … … 127 138 rootElement(); 128 139 129 m_focusEventHook = SetWinEventHook(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS, GetModuleHandle(0), log FocusEventProc, GetCurrentProcessId(), 0, WINEVENT_INCONTEXT);140 m_focusEventHook = SetWinEventHook(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS, GetModuleHandle(0), logEventProc, GetCurrentProcessId(), 0, WINEVENT_INCONTEXT); 130 141 131 142 ASSERT(m_focusEventHook); 132 143 } 144 145 void AccessibilityController::setLogScrollingStartEvents(bool logScrollingStartEvents) 146 { 147 if (!!m_scrollingStartEventHook == logScrollingStartEvents) 148 return; 149 150 if (!logScrollingStartEvents) { 151 UnhookWinEvent(m_scrollingStartEventHook); 152 m_scrollingStartEventHook = 0; 153 return; 154 } 155 156 // Ensure that accessibility is initialized for the WebView by querying for 157 // the root accessible object. 158 rootElement(); 159 160 m_scrollingStartEventHook = SetWinEventHook(EVENT_SYSTEM_SCROLLINGSTART, EVENT_SYSTEM_SCROLLINGSTART, GetModuleHandle(0), logEventProc, GetCurrentProcessId(), 0, WINEVENT_INCONTEXT); 161 162 ASSERT(m_scrollingStartEventHook); 163 }
Note: See TracChangeset
for help on using the changeset viewer.