Bug 130526

Summary: ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: WebKit2Assignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, enrica, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed fix none

Description Alexey Proskuryakov 2014-03-20 12:11:08 PDT
<rdar://problem/16371612>
Comment 1 Alexey Proskuryakov 2014-03-20 12:16:48 PDT
Before r165356, it worked in a different way: this check wasn't an assertion, but a runtime one:

    if (!eventWasSentToWebCore && event == [NSApp currentEvent] && self == [[self window] firstResponder]) {
        _data->_page->handleKeyboardEvent(NativeWebKeyboardEvent(event, self));

The old approach was fragile, it relied on the fact that AppKit sends the synthesized event without updating [NSApp currentEvent], which is a very questionable behavior.
Comment 2 Alexey Proskuryakov 2014-03-20 12:19:03 PDT
Created attachment 227316 [details]
proposed fix
Comment 3 WebKit Commit Bot 2014-03-20 13:30:59 PDT
Comment on attachment 227316 [details]
proposed fix

Rejecting attachment 227316 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
 build commands failed:
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKitTestRunner.build/Release/WebKitTestRunner.build/Objects-normal/x86_64/TestController.o TestController.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
	CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebKitTestRunner.build/Release/WebKitTestRunner.build/Objects-normal/x86_64/PlatformWebViewMac.o mac/PlatformWebViewMac.mm normal x86_64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)

Full output: http://webkit-queues.appspot.com/results/5080808234680320
Comment 4 WebKit Commit Bot 2014-03-20 14:12:27 PDT
Comment on attachment 227316 [details]
proposed fix

Clearing flags on attachment: 227316

Committed r166000: <http://trac.webkit.org/changeset/166000>
Comment 5 WebKit Commit Bot 2014-03-20 14:12:32 PDT
All reviewed patches have been landed.  Closing bug.