[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
enrica at apple.com
enrica at apple.com
Wed Dec 22 15:23:17 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 695670766e4c3bbf2364243bcbb2d90a9c1d6aae
Author: enrica at apple.com <enrica at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 2 17:55:38 2010 +0000
WebKit2: Repeated cmd-key presses lead to unusable UI state
https://bugs.webkit.org/show_bug.cgi?id=48811
<rdar://problem/8611924>
Reviewed by Alexey Proskuryakov.
Given the asynchronous nature of every interaction with the WebProcess,
we could re-send a keyDown event to AppKit that maps to an
action that is currently disabled and therefore will not trigger an action
but a call to the keyDown method of the NSView. We need to detect this
situation to avoid an infinite loop.
* UIProcess/API/mac/WKView.mm:
(-[WKView performKeyEquivalent:]): Delay the release of the last processed event
to the moment we receive another event.
(-[WKView keyDown:]): Added early return in case the event is one we have re-sent.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 2dd3fa8..303bbb0 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,22 @@
+2010-11-02 Enrica Casucci <enrica at apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ WebKit2: Repeated cmd-key presses lead to unusable UI state
+ https://bugs.webkit.org/show_bug.cgi?id=48811
+ <rdar://problem/8611924>
+
+ Given the asynchronous nature of every interaction with the WebProcess,
+ we could re-send a keyDown event to AppKit that maps to an
+ action that is currently disabled and therefore will not trigger an action
+ but a call to the keyDown method of the NSView. We need to detect this
+ situation to avoid an infinite loop.
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView performKeyEquivalent:]): Delay the release of the last processed event
+ to the moment we receive another event.
+ (-[WKView keyDown:]): Added early return in case the event is one we have re-sent.
+
2010-11-02 Anders Carlsson <andersca at apple.com>
Reviewed by John Sullivan.
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index 3d0a4bf..0557914 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -346,9 +346,6 @@ EVENT_HANDLER(scrollWheel, Wheel)
BOOL eventWasSentToWebCore = (_data->_keyDownEventBeingResent == event);
BOOL ret = NO;
- [_data->_keyDownEventBeingResent release];
- _data->_keyDownEventBeingResent = nil;
-
[self retain];
// Pass key combos through WebCore if there is a key binding available for
@@ -356,6 +353,9 @@ EVENT_HANDLER(scrollWheel, Wheel)
// But don't do it if we have already handled the event.
// Pressing Esc results in a fake event being sent - don't pass it to WebCore.
if (!eventWasSentToWebCore && event == [NSApp currentEvent] && self == [[self window] firstResponder]) {
+ [_data->_keyDownEventBeingResent release];
+ _data->_keyDownEventBeingResent = nil;
+
_data->_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, self));
return YES;
}
@@ -389,6 +389,15 @@ EVENT_HANDLER(scrollWheel, Wheel)
- (void)keyDown:(NSEvent *)theEvent
{
+ // We could be receiving a key down from AppKit if we have re-sent an event
+ // that maps to an action that is currently unavailable (for example a copy when
+ // there is no range selection).
+ // If this is the case we should ignore the key down.
+ if (_data->_keyDownEventBeingResent == theEvent) {
+ [_data->_keyDownEventBeingResent release];
+ _data->_keyDownEventBeingResent = nil;
+ return;
+ }
_data->_page->handleKeyboardEvent(NativeWebKeyboardEvent(theEvent, self));
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list