Bug 195268

Summary: iOS: Using ⌥ to scroll horizontally is no different than arrow key
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, darin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.