+2007-12-15 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16436
+ Alt+Space works incorrectly
+
+ * platform/win/fast/events/alt-space-scroll-expected.txt: Added.
+ * platform/win/fast/events/alt-space-scroll.html: Added.
+
2007-12-14 Dan Bernstein <mitz@apple.com>
- share the results of this test between Tiger and Leopard
--- /dev/null
+Test that Alt+Space works correctly.
+
+To test manually, press Alt+Space - a menu for resizing the window should appear; the window should not be scrolled.
+
+Also, press other Alt-key combinations, and verify that keypress event is not dispatched.
+
+target - type - ctrlKey,altKey,shiftKey,metaKey - keyIdentifier - keyCode - charCode
+BODY - keydown - false,false,false,false - Alt - 18 - 0
+BODY - keydown - false,false,false,false - U+0020 - 32 - 0
+BODY - keydown - false,false,false,false - U+0058 - 88 - 0
+
--- /dev/null
+<body onkeypress="log(eventInfo(event))" onkeydown="log(eventInfo(event));">
+<p>Test that Alt+Space works correctly.</p>
+<p>To test manually, press Alt+Space - a menu for resizing the window should appear;
+the window should not be scrolled.</p>
+<p>Also, press other Alt-key combinations, and verify that keypress event is not dispatched.</p>
+<div id="log"></div>
+<div style="width:1;height:1000"></div>
+<script>
+function log(msg) {
+ document.getElementById("log").innerHTML+= msg + "<br />";
+}
+
+
+function eventInfo(event, where) {
+ try {
+ if (!event)
+ event = window.event;
+ target = event.srcElement ? event.srcElement : event.target;
+ if (event.type == "keydown" || event.type == "keypress" || event.type == "keyup")
+ return (where ? "(" + where + ") " : "") + target.tagName
+ + (target.tagName == "INPUT" ? " " + target.type : "")
+ + " - " + event.type
+ + ' - ' + [event.ctrlKey, event.altKey, event.shiftKey, event.metaKey]
+ + ' - ' + event.keyIdentifier
+ + ' - ' + event.keyCode
+ + ' - ' + event.charCode;
+ } catch (ex) {
+ alert(ex);
+ }
+}
+log("target - type - " + ["ctrlKey", "altKey", "shiftKey", "metaKey"]
+ + ' - ' + "keyIdentifier"
+ + ' - ' + "keyCode"
+ + ' - ' + "charCode");
+
+if (window.layoutTestController) {
+
+ layoutTestController.dumpAsText();
+ eventSender.dispatchMessage(eventSender.WM_SYSKEYDOWN, 0x12 /* Alt */, 0x20380001);
+ eventSender.dispatchMessage(eventSender.WM_SYSKEYDOWN, 0x20 /* Space */, 0x20390001);
+ eventSender.dispatchMessage(eventSender.WM_SYSCHAR, 0x20 /* Space */, 0x20390001);
+ eventSender.dispatchMessage(eventSender.WM_SYSKEYDOWN, 0x58 /* X */, 0x202d0001);
+ eventSender.dispatchMessage(eventSender.WM_SYSCHAR, 0x78 /* x */, 0x202d0001);
+}
+
+</script>
+
+</body>
+2007-12-15 Alexey Proskuryakov <ap@webkit.org>
+
+ Reviewed by Maciej.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16436
+ Alt+Space works incorrectly
+
+ Test: platform/win/fast/events/alt-space-scroll.html
+
+ * WebView.cpp:
+ (WebView::keyDown):
+ (WebView::keyPress):
+ We do not handle WM_SYSCHAR events.
+
2007-12-14 Dan Bernstein <mitz@apple.com>
- yet another build fix
PlatformKeyboardEvent keyEvent(m_viewWindow, virtualKeyCode, keyData, PlatformKeyboardEvent::RawKeyDown, systemKeyDown);
bool handled = frame->eventHandler()->keyEvent(keyEvent);
- // These events cannot be canceled.
+ // These events cannot be canceled, and we have no default handling for them.
// FIXME: match IE list more closely, see <http://msdn2.microsoft.com/en-us/library/ms536938.aspx>.
if (systemKeyDown)
- handled = false;
+ return false;
if (handled) {
// FIXME: remove WM_UNICHAR, too
bool WebView::keyPress(WPARAM charCode, LPARAM keyData, bool systemKeyDown)
{
+ // IE does not dispatch keypress event for WM_SYSCHAR.
+ if (systemKeyDown)
+ return false;
+
Frame* frame = m_page->focusController()->focusedOrMainFrame();
PlatformKeyboardEvent keyEvent(m_viewWindow, charCode, keyData, PlatformKeyboardEvent::Char, systemKeyDown);