[Webkit-unassigned] [Bug 78206] keydown event is fired once for every millisecond the Esc key is held down

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 10 21:07:54 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=78206


Joseph Pecoraro <joepeck at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |enrica at apple.com




--- Comment #3 from Joseph Pecoraro <joepeck at webkit.org>  2012-03-10 21:07:54 PST ---
A workaround would be to call event.preventDefault() in the JavaScript handler.

The duplicate events seems to be caused by the default behavior of the Esc key for a window. WebCore sends a "cancelOperation" up to WebKit and the NSResponder chain to the NSWindow which sends a _cancelKey (Esc key) back down into the page. Here is a UIProcess snippet I took of Safari. Maybe this handling of _cancelKey can be made smarter?

    Breakpoint 1, WebKit::WebPageProxy::handleKeyboardEvent (this=0x7fd3f6804000, event=@0x7fff6fa56d88) Source/WebKit2/UIProcess/WebPageProxy.cpp:971
    971     if (!isValid())
    #0  WebKit::WebPageProxy::handleKeyboardEvent (this=0x7fd3f6804000, event=@0x7fff6fa56d88) Source/WebKit2/UIProcess/WebPageProxy.cpp:971
    #1  0x0000000112d57ea8 in -[WKView performKeyEquivalent:] (self=0x7fd3f5a07900, _cmd=0x7fff8110fac4, event=0x7fd3f44716e0) Source/WebKit2/UIProcess/API/mac/WKView.mm:1229
    #2  0x000000011004a7fd in -[BrowserWKView performKeyEquivalent:] (self=0x7fd3f5a07900, _cmd=0x7fff8110fac4, event=0x7fd3f44716e0)
    #3  0x00007fff809f91a0 in -[NSView _performKeyEquivalent:conditionally:] ()
    #4  0x00007fff809f92ce in -[NSView performKeyEquivalent:] ()
    #5  0x00007fff809f91a0 in -[NSView _performKeyEquivalent:conditionally:] ()
    #6  0x00007fff809f92ce in -[NSView performKeyEquivalent:] ()
    #7  0x00007fff809f91a0 in -[NSView _performKeyEquivalent:conditionally:] ()
    #8  0x00007fff809f92ce in -[NSView performKeyEquivalent:] ()
    #9  0x00007fff809f91a0 in -[NSView _performKeyEquivalent:conditionally:] ()
    #10 0x00007fff809f92ce in -[NSView performKeyEquivalent:] ()
    #11 0x00007fff809f91a0 in -[NSView _performKeyEquivalent:conditionally:] ()
    #12 0x00007fff809f9111 in -[NSWindow performKeyEquivalent:] ()
    #13 0x0000000110554116 in -[Window performKeyEquivalent:] (self=0x7fd3f5b92c60, _cmd=0x7fff8110fac4, event=0x7fd3f44716e0)
    #14 0x00000001100058d9 in -[BrowserWindow performKeyEquivalent:] (self=0x7fd3f5b92c60, _cmd=0x7fff8110fac4, event=0x7fd3f44716e0)
>   #15 0x00007fff80f19699 in -[NSWindow _cancelKey:] ()
    #16 0x00007fff8c6d275d in -[NSObject performSelector:withObject:] ()
    #17 0x00007fff80daf659 in -[NSResponder doCommandBySelector:] ()
    #18 0x00007fff80f1c826 in -[NSWindow doCommandBySelector:] ()
    #19 0x00007fff80daf72b in -[NSResponder doCommandBySelector:] ()
    #20 0x00007fff80daf72b in -[NSResponder doCommandBySelector:] ()
    #21 0x00007fff80daf72b in -[NSResponder doCommandBySelector:] ()
    #22 0x00007fff80daf72b in -[NSResponder doCommandBySelector:] ()
    #23 0x0000000112d60e02 in -[WKView(Internal) _executeSavedCommandBySelector:] (self=0x7fd3f5a07900, _cmd=0x7fff84fe874a, selector=0x7fff8114ca3c) Source/WebKit2/UIProcess/API/mac/WKView.mm:2673
    #24 0x0000000112b0eac0 in WebKit::PageClientImpl::executeSavedCommandBySelector (this=0x7fd3f5a0c510, selectorString=@0x7fff6fa57560) Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm:519
    #25 0x0000000112cb1502 in WebKit::WebPageProxy::executeSavedCommandBySelector (this=0x7fd3f6804000, selector=@0x7fff6fa57560, handled=@0x7fff6fa57558) Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm:375
    #26 0x0000000112cc086f in CoreIPC::callMemberFunction<WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(WTF::String const&, bool&), WTF::String, bool> (args=@0x7fff6fa57560, replyArgs=@0x7fff6fa57558, object=0x7fd3f6804000, function={ptr = 4610266304, ptr = 0}) at HandleMessage.h:93
    #27 0x0000000112cc02fa in CoreIPC::handleMessage<Messages::WebPageProxy::ExecuteSavedCommandBySelector, WebKit::WebPageProxy, void (WebKit::WebPageProxy::*)(WTF::String const&, bool&)> (argumentDecoder=0x7fd3f7910e50, replyEncoder=0x7fd3f4154770, object=0x7fd3f6804000, function={ptr = 4610266304, ptr = 0}) at HandleMessage.h:307
    ...

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list