Bug 151538

Summary: [iOS] Option-up and Option-down should scroll a little less than a full page
Product: WebKit Reporter: Tim Horton <thorton>
Component: New BugsAssignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, enrica, rmondello, sam, simon.fraser
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch simon.fraser: review+

Description Tim Horton 2015-11-21 21:28:11 PST
[iOS] Option-up and Option-down should scroll a little less than a full page
Comment 1 Tim Horton 2015-11-21 21:28:30 PST
Created attachment 266041 [details]
Patch
Comment 2 Tim Horton 2015-11-21 21:29:14 PST
Looking into writing a test, will have to plumb the ability to use arbitrary modifiers when sending key events.
Comment 3 WebKit Commit Bot 2015-11-21 21:30:37 PST
Attachment 266041 [details] did not pass style-queue:


ERROR: Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:2882:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Simon Fraser (smfr) 2015-11-22 08:24:21 PST
Comment on attachment 266041 [details]
Patch

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

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:2868
> +- (Optional<FloatPoint>)_scrollOffsetForEvent:(WebIOSEvent *)event

FloatSize?

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:2885
> +        CGFloat scrollDistance = ^ CGFloat {

Not sure what's happening here.

> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:2907
> +        return computeOffset(Line, Left);

I would prefer blank lines after all the returns.
Comment 5 Tim Horton 2015-11-30 10:00:41 PST
(In reply to comment #4)
> Comment on attachment 266041 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=266041&action=review
> 
> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:2868
> > +- (Optional<FloatPoint>)_scrollOffsetForEvent:(WebIOSEvent *)event
> 
> FloatSize?

_scrollByContentOffset takes a FloatPoint :D

> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:2885
> > +        CGFloat scrollDistance = ^ CGFloat {
> 
> Not sure what's happening here.

Blocks, man!

No, but really, that's the syntax for when you want to explicitly state the return type of a block. Which I need to do because of the 0 (and the ints). Or I could cast all of those but I hate that more.

> > Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:2907
> > +        return computeOffset(Line, Left);
> 
> I would prefer blank lines after all the returns.

Sure.
Comment 6 Tim Horton 2015-11-30 11:53:23 PST
http://trac.webkit.org/changeset/192811