Bug 127819

Summary: [iOS] round the scrollview content size to natural numbers
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED INVALID    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Benjamin Poulain 2014-01-28 17:39:04 PST
[iOS] round the scrollview content size to natural numbers
Comment 1 Benjamin Poulain 2014-01-28 17:45:30 PST
Created attachment 222536 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-01-29 16:32:54 PST
Comment on attachment 222536 [details]
Patch

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

> Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm:110
> -    CGSize contentsSizeInScrollViewCoordinates = CGSizeMake(newSize.width * zoomScale, newSize.height * zoomScale);
> +    CGSize contentsSizeInScrollViewCoordinates = CGSizeMake(std::round(newSize.width * zoomScale), std::round(newSize.height * zoomScale));

Should we also adjust the scale so it still reflects the scaling after rounding?
Comment 3 Benjamin Poulain 2014-01-29 16:55:01 PST
(In reply to comment #2)
> (From update of attachment 222536 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=222536&action=review
> 
> > Source/WebKit2/UIProcess/API/ios/WKViewIOS.mm:110
> > -    CGSize contentsSizeInScrollViewCoordinates = CGSizeMake(newSize.width * zoomScale, newSize.height * zoomScale);
> > +    CGSize contentsSizeInScrollViewCoordinates = CGSizeMake(std::round(newSize.width * zoomScale), std::round(newSize.height * zoomScale));
> 
> Should we also adjust the scale so it still reflects the scaling after rounding?

That sounds like a good idea.
Comment 4 Benjamin Poulain 2014-01-30 15:48:22 PST
Comment on attachment 222536 [details]
Patch

Simon pointed out this is incomplete.
Comment 5 Benjamin Poulain 2014-08-19 22:34:35 PDT
I fixed that somewhere else IIRC.