WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
200464
[Win][MiniBrowser][WK2] Unhandled key events should be bubbled up to the parent window
https://bugs.webkit.org/show_bug.cgi?id=200464
Summary
[Win][MiniBrowser][WK2] Unhandled key events should be bubbled up to the pare...
Fujii Hironori
Reported
2019-08-05 20:44:03 PDT
[MiniBrowser][WK2] Unhandled key events should be bubbled up to the parent window When WK2 WebView is focused, short cut keys (e.g. Alt-F to open File menu, Alt-F4 to close window, and etc) don't work. WK1 WebView doesn't have this issue because it processes key events properly.
Attachments
Patch
(4.21 KB, patch)
2019-08-05 20:48 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Patch
(4.21 KB, patch)
2019-08-05 23:16 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2019-08-05 20:48:10 PDT
Created
attachment 375597
[details]
Patch
Ross Kirsling
Comment 2
2019-08-05 22:08:01 PDT
Comment on
attachment 375597
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=375597&action=review
> Tools/MiniBrowser/win/WebKitBrowserWindow.cpp:385 > + SendMessage(thisWindow.m_hMainWnd, event->message, event->wParam, event->lParam);
What's the difference of SendMessage here from the DefWindowProc that's used in these places?
https://github.com/WebKit/webkit/blob/master/Source/WebKitLegacy/win/WebView.cpp#L2818
https://github.com/WebKit/webkit/blob/master/Source/WebKit/UIProcess/win/WebView.cpp#L179
Fujii Hironori
Comment 3
2019-08-05 23:15:48 PDT
Comment on
attachment 375597
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=375597&action=review
>> Tools/MiniBrowser/win/WebKitBrowserWindow.cpp:385 >> + SendMessage(thisWindow.m_hMainWnd, event->message, event->wParam, event->lParam); > > What's the difference of SendMessage here from the DefWindowProc that's used in these places? >
https://github.com/WebKit/webkit/blob/master/Source/WebKitLegacy/win/WebView.cpp#L2818
>
https://github.com/WebKit/webkit/blob/master/Source/WebKit/UIProcess/win/WebView.cpp#L179
In WK1, key events are handled synchronously. If WebView doesn't handle the key event, it will be passed to DefWindowProc which sends it to the parent window. On the other hand, in WK2, key events are handled asynchronously in WebProcess. handled is always set true here.
https://github.com/WebKit/webkit/tree/69699b3c92158cb980cf7d4356dfd6edaab4a35f/Source/WebKit/UIProcess/win/WebView.cpp#L451,L453
So, I need to re-post the key event in didNotHandleKeyEvent. Thanks for your comment, I realized I think I should use DefWindowProc instead of SendMessage.
Fujii Hironori
Comment 4
2019-08-05 23:16:32 PDT
Created
attachment 375603
[details]
Patch
Fujii Hironori
Comment 5
2019-08-05 23:47:50 PDT
Comment on
attachment 375603
[details]
Patch Clearing flags on attachment: 375603 Committed
r248291
: <
https://trac.webkit.org/changeset/248291
>
Fujii Hironori
Comment 6
2019-08-05 23:47:54 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7
2019-08-05 23:48:16 PDT
<
rdar://problem/53974077
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug