[Webkit-unassigned] [Bug 228302] macOS key-driven smooth scrolling does not stop when focus changes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 28 16:48:21 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=228302
--- Comment #15 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 439531
--> https://bugs.webkit.org/attachment.cgi?id=439531
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=439531&action=review
> Source/WebCore/platform/ScrollingEffectsController.h:146
> + void updateScrollAnimationIfNecessary();
If "update" is always "stop" then we should call it "stop" everywhere. I don't think it will automatically start under any circumstances.
> Tools/DumpRenderTree/mac/EventSendingController.mm:1230
> + NSString *eventCharacter = character;
> + unsigned short keyCode = 0;
> + if ([character isEqualToString:@"leftArrow"]) {
> + const unichar ch = NSLeftArrowFunctionKey;
> + eventCharacter = [NSString stringWithCharacters:&ch length:1];
> + keyCode = 0x7B;
> + } else if ([character isEqualToString:@"rightArrow"]) {
> + const unichar ch = NSRightArrowFunctionKey;
> + eventCharacter = [NSString stringWithCharacters:&ch length:1];
This is the 3rd copy of this code in the tree. I think we really need to share it (see TestRunnerShared).
> Tools/DumpRenderTree/mac/EventSendingController.mm:1447
> + NSString *eventCharacter = character;
> + unsigned short keyCode = 0;
> + if ([character isEqualToString:@"leftArrow"]) {
> + const unichar ch = NSLeftArrowFunctionKey;
> + eventCharacter = [NSString stringWithCharacters:&ch length:1];
> + keyCode = 0x7B;
> + } else if ([character isEqualToString:@"rightArrow"]) {
> + const unichar ch = NSRightArrowFunctionKey;
> + eventCharacter = [NSString stringWithCharacters:&ch length:1];
> + keyCode = 0x7C;
Same.
> Tools/WebKitTestRunner/mac/EventSenderProxy.mm:864
> + unsigned short keyCode = 0;
> + if ([character isEqualToString:@"leftArrow"]) {
> + const unichar ch = NSLeftArrowFunctionKey;
> + eventCharacter = [NSString stringWithCharacters:&ch length:1];
> + keyCode = 0x7B;
> + } else if ([character isEqualToString:@"rightArrow"]) {
> + const unichar ch = NSRightArrowFunctionKey;
4th copy now?
> LayoutTests/resources/ui-helper.js:355
> + eventSender.rawKeyDown(key, modifiers);
> + return Promise.resolve();
> + }
> +
> + return new Promise((resolve) => {
> + testRunner.runUIScript(`uiController.rawKeyDown("${key}", ${JSON.stringify(modifiers)});`, resolve);
Can we just make uiController.rawKeyDown() work on macOS?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210928/e8b484f4/attachment.htm>
More information about the webkit-unassigned
mailing list