WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
229784
KeyboardEvent should setDefaultHandled if EventHandler::startKeyboardScrolling returns true
https://bugs.webkit.org/show_bug.cgi?id=229784
Summary
KeyboardEvent should setDefaultHandled if EventHandler::startKeyboardScrollin...
Fujii Hironori
Reported
2021-09-01 17:35:25 PDT
KeyboardEvent should setDefaultHandled if EventHandler::startKeyboardScrolling returns true
Attachments
WIP patch
(1.12 KB, patch)
2021-09-01 17:37 PDT
,
Fujii Hironori
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
WIP patch
(1.34 KB, patch)
2021-09-01 18:31 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
WIP Patch
(5.04 KB, patch)
2021-09-02 23:40 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Patch
(6.57 KB, patch)
2021-09-05 23:03 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Patch
(6.58 KB, patch)
2021-09-07 17:06 PDT
,
Fujii Hironori
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2021-09-01 17:37:11 PDT
Created
attachment 437094
[details]
WIP patch
Darin Adler
Comment 2
2021-09-01 17:47:29 PDT
Can we create a test for this? Given this is an improvement, I imagine the improvement is detectable, and we should add a test.
Fujii Hironori
Comment 3
2021-09-01 18:31:09 PDT
Yup, that's what I want to do now.
Fujii Hironori
Comment 4
2021-09-01 18:31:42 PDT
Created
attachment 437101
[details]
WIP patch
Fujii Hironori
Comment 5
2021-09-02 23:40:51 PDT
Created
attachment 437246
[details]
WIP Patch
Fujii Hironori
Comment 6
2021-09-05 23:03:33 PDT
Created
attachment 437385
[details]
Patch
Tim Horton
Comment 7
2021-09-07 13:19:42 PDT
Comment on
attachment 437385
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=437385&action=review
> LayoutTests/fast/scrolling/keyboard-scrolling-last-timestamp.html:19 > + await UIHelper.delayFor(500);
Is there any way to write this test without a 500ms pause? We generally try to avoid this at the scale of 60k tests :)
Fujii Hironori
Comment 8
2021-09-07 17:04:46 PDT
Comment on
attachment 437385
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=437385&action=review
>> LayoutTests/fast/scrolling/keyboard-scrolling-last-timestamp.html:19 >> + await UIHelper.delayFor(500); > > Is there any way to write this test without a 500ms pause? We generally try to avoid this at the scale of 60k tests :)
Good point. UIHelper.waitForTargetScrollAnimationToSettle seems the one I want.
Fujii Hironori
Comment 9
2021-09-07 17:06:19 PDT
Created
attachment 437572
[details]
Patch
Darin Adler
Comment 10
2021-09-07 17:09:43 PDT
Comment on
attachment 437572
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=437572&action=review
> LayoutTests/ChangeLog:9 > + * fast/scrolling/keyboard-scrolling-last-timestamp-expected.txt: Added. > + * fast/scrolling/keyboard-scrolling-last-timestamp.html: Added.
What happens in this test if default handled is not set?
Fujii Hironori
Comment 11
2021-09-07 17:24:26 PDT
Comment on
attachment 437572
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=437572&action=review
>> LayoutTests/ChangeLog:9 >> + * fast/scrolling/keyboard-scrolling-last-timestamp.html: Added. > > What happens in this test if default handled is not set?
internals.lastHandledUserGestureTimestamp() didn't change by the key events before my change. EventHandler::keyEvent updates lastHandledUserGestureTimestamp if the default hander handled.
https://github.com/WebKit/WebKit/blob/292ba371d52e1291c750185a82c7ce04e231e508/Source/WebCore/page/EventHandler.cpp#L3490
Darin Adler
Comment 12
2021-09-07 18:24:11 PDT
Comment on
attachment 437572
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=437572&action=review
>>> LayoutTests/ChangeLog:9 >>> + * fast/scrolling/keyboard-scrolling-last-timestamp.html: Added. >> >> What happens in this test if default handled is not set? > > internals.lastHandledUserGestureTimestamp() didn't change by the key events before my change. > > EventHandler::keyEvent updates lastHandledUserGestureTimestamp if the default hander handled. >
https://github.com/WebKit/WebKit/blob/292ba371d52e1291c750185a82c7ce04e231e508/Source/WebCore/page/EventHandler.cpp#L3490
Creating finding that. I guess it’s hard to test since "defaultHandled" is an internal thing, not directly visible to the web platform. I suppose we primarily can detect it by seeing that certain default behavior didn’t happen.
Fujii Hironori
Comment 13
2021-09-07 23:39:34 PDT
Comment on
attachment 437572
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=437572&action=review
>>>> LayoutTests/ChangeLog:9 >>>> + * fast/scrolling/keyboard-scrolling-last-timestamp.html: Added. >>> >>> What happens in this test if default handled is not set? >> >> internals.lastHandledUserGestureTimestamp() didn't change by the key events before my change. >> >> EventHandler::keyEvent updates lastHandledUserGestureTimestamp if the default hander handled. >>
https://github.com/WebKit/WebKit/blob/292ba371d52e1291c750185a82c7ce04e231e508/Source/WebCore/page/EventHandler.cpp#L3490
> > Creating finding that. I guess it’s hard to test since "defaultHandled" is an internal thing, not directly visible to the web platform. I suppose we primarily can detect it by seeing that certain default behavior didn’t happen.
I don't understand. How can I do that? I think TestWebKitAPI can test this change by using WKPageUIClientV0::didNotHandleKeyEvent. Is it better?
Darin Adler
Comment 14
2021-09-08 09:57:09 PDT
(In reply to Fujii Hironori from
comment #13
)
> I don't understand. How can I do that?
I don’t know if you can.
> I think TestWebKitAPI can test this change by using > WKPageUIClientV0::didNotHandleKeyEvent. Is it better?
Probably better in some ways, but this is also OK.
Fujii Hironori
Comment 15
2021-09-08 12:58:10 PDT
Comment on
attachment 437572
[details]
Patch Clearing flags on attachment: 437572 Committed
r282165
(
241457@main
): <
https://commits.webkit.org/241457@main
>
Fujii Hironori
Comment 16
2021-09-08 12:58:14 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 17
2021-09-08 12:59:16 PDT
<
rdar://problem/82887017
>
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