Changeset 53889 in webkit
- Timestamp:
- Jan 26, 2010 8:09:22 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r53878 r53889 1 2010-01-26 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 [Win] Add modifiers parameter support to Windows DumpRenderTree 6 https://bugs.webkit.org/show_bug.cgi?id=34068 7 8 Remove listbox-deselect-scroll.html and listbox-selectio-2.html 9 from Skipped. We improved their portability and Windows DRT now 10 havs modifiers parameter of eventSender.mouseDown() and 11 eventSender.mouseUp(). 12 13 * platform/win/Skipped: 14 1 15 2010-01-26 Adele Peterson <adele@apple.com> 2 16 -
trunk/LayoutTests/platform/win/Skipped
r53791 r53889 450 450 fast/forms/hidden-listbox.html 451 451 fast/forms/legend-access-key.html 452 fast/forms/listbox-deselect-scroll.html453 452 fast/forms/listbox-hit-test-zoomed.html 454 453 fast/forms/listbox-scrollbar-incremental-load.html 455 fast/forms/listbox-selection-2.html456 454 fast/forms/listbox-width-change.html 457 455 fast/forms/option-strip-whitespace.html -
trunk/WebKitTools/ChangeLog
r53887 r53889 1 2010-01-26 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 [Win] Add modifiers parameter support to Windows DumpRenderTree 6 https://bugs.webkit.org/show_bug.cgi?id=34068 7 8 Add support for functional name modifiers; "addSelectionKey" and 9 "rangeSelectionKey", and modifiers parameter to eventSender.mouseDown() 10 and eventSender.mouseUp(). 11 This change is similar to r53498 for Mac. 12 13 * DumpRenderTree/win/EventSender.cpp: 14 (buildModifierFlags): New function to set MK_CONTROL or MK_SHIFT to WPARAM. 15 (mouseDownCallback): Call buidlModifiersFlags(). 16 (mouseUpCallback): ditto. 17 (keyDownCallback): Add support for "addSelectionkey" and "rangeSelectionKey". 18 1 19 2010-01-26 Chris Jerdonek <cjerdonek@webkit.org> 2 20 -
trunk/WebKitTools/DumpRenderTree/win/EventSender.cpp
r49336 r53889 145 145 } 146 146 147 static WPARAM buildModifierFlags(JSContextRef context, const JSValueRef modifiers) 148 { 149 JSObjectRef modifiersArray = JSValueToObject(context, modifiers, 0); 150 if (!modifiersArray) 151 return 0; 152 153 WPARAM flags = 0; 154 int modifiersCount = JSValueToNumber(context, JSObjectGetProperty(context, modifiersArray, JSStringCreateWithUTF8CString("length"), 0), 0); 155 for (int i = 0; i < modifiersCount; ++i) { 156 JSValueRef value = JSObjectGetPropertyAtIndex(context, modifiersArray, i, 0); 157 JSStringRef string = JSValueToStringCopy(context, value, 0); 158 if (JSStringIsEqualToUTF8CString(string, "ctrlKey") 159 || JSStringIsEqualToUTF8CString(string, "addSelectionKey")) 160 flags |= MK_CONTROL; 161 else if (JSStringIsEqualToUTF8CString(string, "shiftKey") 162 || JSStringIsEqualToUTF8CString(string, "rangeSelectionKey")) 163 flags |= MK_SHIFT; 164 // No way to specifiy altKey in a MSG. 165 166 JSStringRelease(string); 167 } 168 return flags; 169 } 170 147 171 static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 148 172 { … … 153 177 down = true; 154 178 int mouseType = WM_LBUTTONDOWN; 155 if (argumentCount == 1) {179 if (argumentCount >= 1) { 156 180 int mouseNumber = JSValueToNumber(context, arguments[0], exception); 157 181 switch (mouseNumber) { … … 174 198 } 175 199 } 200 201 WPARAM wparam = 0; 202 if (argumentCount >= 2) 203 wparam |= buildModifierFlags(context, arguments[1]); 176 204 177 MSG msg = makeMsg(webViewWindow, mouseType, 0, MAKELPARAM(lastMousePosition.x, lastMousePosition.y));205 MSG msg = makeMsg(webViewWindow, mouseType, wparam, MAKELPARAM(lastMousePosition.x, lastMousePosition.y)); 178 206 if (!msgQueue[endOfQueue].delay) 179 207 dispatchMessage(&msg); … … 235 263 { 236 264 int mouseType = WM_LBUTTONUP; 237 if (argumentCount == 1) {265 if (argumentCount >= 1) { 238 266 int mouseNumber = JSValueToNumber(context, arguments[0], exception); 239 267 switch (mouseNumber) { … … 257 285 } 258 286 259 MSG msg = makeMsg(webViewWindow, mouseType, 0, MAKELPARAM(lastMousePosition.x, lastMousePosition.y)); 287 WPARAM wparam = 0; 288 if (argumentCount >= 2) 289 wparam |= buildModifierFlags(context, arguments[1]); 290 291 MSG msg = makeMsg(webViewWindow, mouseType, wparam, MAKELPARAM(lastMousePosition.x, lastMousePosition.y)); 260 292 261 293 if ((dragMode && !replayingSavedEvents) || msgQueue[endOfQueue].delay) { … … 463 495 JSValueRef value = JSObjectGetPropertyAtIndex(context, modifiersArray, i, 0); 464 496 JSStringRef string = JSValueToStringCopy(context, value, 0); 465 if (JSStringIsEqualToUTF8CString(string, "ctrlKey") )497 if (JSStringIsEqualToUTF8CString(string, "ctrlKey") || JSStringIsEqualToUTF8CString(string, "addSelectionKey")) 466 498 newKeyState[VK_CONTROL] = 0x80; 467 else if (JSStringIsEqualToUTF8CString(string, "shiftKey") )499 else if (JSStringIsEqualToUTF8CString(string, "shiftKey") || JSStringIsEqualToUTF8CString(string, "rangeSelectionKey")) 468 500 newKeyState[VK_SHIFT] = 0x80; 469 501 else if (JSStringIsEqualToUTF8CString(string, "altKey"))
Note: See TracChangeset
for help on using the changeset viewer.