RESOLVED FIXED229733
REGRESSION(r280928) The smooth keyboard scrolling is unconditionally enabled for PageUp and PageDown keys
https://bugs.webkit.org/show_bug.cgi?id=229733
Summary REGRESSION(r280928) The smooth keyboard scrolling is unconditionally enabled ...
Fujii Hironori
Reported 2021-08-31 13:41:21 PDT
REGRESSION(r280928) The smooth keyboard scrolling is enabled only for PageUp and PageDown keys Since: r280928 (Bug 228156) 1. Start WinCairo MiniBrowser 2. Press PageDown key Actual: scolling smoothly Expected: scolling not smoothly NOTE: Space key and Arrow key don't trigger the smooth keyboard scrolling.
Attachments
Patch (1.98 KB, patch)
2021-08-31 13:51 PDT, Fujii Hironori
no flags
Patch (3.04 KB, patch)
2021-08-31 17:24 PDT, Fujii Hironori
no flags
Patch (2.16 KB, patch)
2021-08-31 17:50 PDT, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2021-08-31 13:51:10 PDT
Darin Adler
Comment 2 2021-08-31 13:52:43 PDT
Comment on attachment 436938 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=436938&action=review > Source/WebCore/page/EventHandler.cpp:3812 > + else if (m_frame.settings().eventHandlerDrivenSmoothKeyboardScrollingEnabled() > + && (event.keyIdentifier() == "PageUp" || event.keyIdentifier() == "PageDown")) > startKeyboardScrolling(event); This looks like it will make PageUp and PageDown not scroll at all? Is that right?
Fujii Hironori
Comment 3 2021-08-31 14:17:22 PDT
Comment on attachment 436938 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=436938&action=review >> Source/WebCore/page/EventHandler.cpp:3812 >> startKeyboardScrolling(event); > > This looks like it will make PageUp and PageDown not scroll at all? Is that right? This change restores the previous behavior before r280928. If the key event isn't consumed by WebCore's handleKeyEvent, WebKit's WebPage::performDefaultBehaviorForKeyEvent handles it.
Tim Horton
Comment 4 2021-08-31 14:20:42 PDT
Comment on attachment 436938 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=436938&action=review > Source/WebCore/ChangeLog:3 > + REGRESSION(r280928) The smooth keyboard scrolling is enabled only for PageUp and PageDown keys From the wording of the title ("enabled only for") I assumed the fix would be "enable it for more things". But actually it is fixing the fact that it was accidentally enabled unconditionally for pageup/down. Current title is fine, but a rewording could make it more clear. Regardless, this seems fine. >>> Source/WebCore/page/EventHandler.cpp:3812 >>> startKeyboardScrolling(event); >> >> This looks like it will make PageUp and PageDown not scroll at all? Is that right? > > This change restores the previous behavior before r280928. > If the key event isn't consumed by WebCore's handleKeyEvent, WebKit's WebPage::performDefaultBehaviorForKeyEvent handles it. Possible we should just move the setting check /inside/ startKeyboardScrolling?
Fujii Hironori
Comment 5 2021-08-31 17:14:22 PDT
Comment on attachment 436938 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=436938&action=review >> Source/WebCore/ChangeLog:3 >> + REGRESSION(r280928) The smooth keyboard scrolling is enabled only for PageUp and PageDown keys > > From the wording of the title ("enabled only for") I assumed the fix would be "enable it for more things". But actually it is fixing the fact that it was accidentally enabled unconditionally for pageup/down. Current title is fine, but a rewording could make it more clear. Regardless, this seems fine. Fixed. >>>> Source/WebCore/page/EventHandler.cpp:3812 >>>> startKeyboardScrolling(event); >>> >>> This looks like it will make PageUp and PageDown not scroll at all? Is that right? >> >> This change restores the previous behavior before r280928. >> If the key event isn't consumed by WebCore's handleKeyEvent, WebKit's WebPage::performDefaultBehaviorForKeyEvent handles it. > > Possible we should just move the setting check /inside/ startKeyboardScrolling? Good idea. Will fix.
Fujii Hironori
Comment 6 2021-08-31 17:24:32 PDT
Darin Adler
Comment 7 2021-08-31 17:30:49 PDT
Comment on attachment 436971 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=436971&action=review > Source/WebCore/page/EventHandler.cpp:3812 > + event.setDefaultHandled(); What was calling setDefaultHandled here before? Change log doesn’t mention this change, and it’s a change that affects only the other ports, not WinCairo. > Source/WebCore/page/EventHandler.cpp:4312 > + event.setDefaultHandled(); Ditto.
Fujii Hironori
Comment 8 2021-08-31 17:49:05 PDT
Comment on attachment 436971 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=436971&action=review >> Source/WebCore/page/EventHandler.cpp:3812 >> + event.setDefaultHandled(); > > What was calling setDefaultHandled here before? Change log doesn’t mention this change, and it’s a change that affects only the other ports, not WinCairo. Yes. It's another change. I'm going to split the patch for the part.
Fujii Hironori
Comment 9 2021-08-31 17:50:05 PDT
Fujii Hironori
Comment 10 2021-09-01 12:50:19 PDT
Comment on attachment 436975 [details] Patch Clearing flags on attachment: 436975 Committed r281867 (241197@main): <https://commits.webkit.org/241197@main>
Fujii Hironori
Comment 11 2021-09-01 12:50:23 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 12 2021-09-01 12:51:27 PDT
Fujii Hironori
Comment 13 2021-09-01 17:38:20 PDT
(In reply to Fujii Hironori from comment #8) > Yes. It's another change. I'm going to split the patch for the part. Filed: Bug 229784 – KeyboardEvent should setDefaultHandled if EventHandler::startKeyboardScrolling returns true
Adrian Perez
Comment 14 2021-11-04 02:48:52 PDT
*** Bug 232701 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.