Bug 195268 - iOS: Using ⌥ to scroll horizontally is no different than arrow key
Summary: iOS: Using ⌥ to scroll horizontally is no different than arrow key
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-04 00:30 PST by Tim Horton
Modified: 2019-03-10 19:55 PDT (History)
4 users (show)

See Also:


Attachments
Patch (9.25 KB, patch)
2019-03-04 00:30 PST, Tim Horton
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2019-03-04 00:30:33 PST
iOS: Using ⌥ to scroll horizontally is no different than arrow key
Comment 1 Tim Horton 2019-03-04 00:30:44 PST
Created attachment 363496 [details]
Patch
Comment 2 Tim Horton 2019-03-04 00:30:47 PST
<rdar://problem/48326682>
Comment 3 Brent Fulgham 2019-03-05 09:43:59 PST
Comment on attachment 363496 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=363496&action=review

> Source/WebKit/ChangeLog:3
> +        iOS: Using ⥠to scroll horizontally is no different than arrow key

Should this comment be ASCII only?

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4428
> +        return directionIsHorizontal ? documentSize.width : documentSize.height;

We could have a helper function that converted ScrollingDirection + CGSize to the right output. Then it could be used in WKKeyboardScrollingAnimator.mm 'distanceForIncrement', too.

But not today.
Comment 4 Darin Adler 2019-03-10 17:08:58 PDT
Comment on attachment 363496 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=363496&action=review

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4435
>          return [self convertSize:CGSizeMake(0, WebCore::Scrollbar::pixelsPerLineStep()) toView:_webView].height;

Should this assert !horizontal?
Comment 5 Tim Horton 2019-03-10 19:28:40 PDT
Comment on attachment 363496 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=363496&action=review

>> Source/WebKit/ChangeLog:3
>> +        iOS: Using ⥠to scroll horizontally is no different than arrow key
> 
> Should this comment be ASCII only?

No, the only thing that has a problem with this is the review tool. We have this problem a lot with smart quotes too :)

>> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:4435
>>          return [self convertSize:CGSizeMake(0, WebCore::Scrollbar::pixelsPerLineStep()) toView:_webView].height;
> 
> Should this assert !horizontal?

No, definitely not. The default left/right arrow key behavior is "by line" and uses the vertical line height.
Comment 6 WebKit Commit Bot 2019-03-10 19:55:00 PDT
Comment on attachment 363496 [details]
Patch

Clearing flags on attachment: 363496

Committed r242695: <https://trac.webkit.org/changeset/242695>
Comment 7 WebKit Commit Bot 2019-03-10 19:55:02 PDT
All reviewed patches have been landed.  Closing bug.