| Summary: | [iOS] round the scrollview content size to natural numbers | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Benjamin Poulain <benjamin> | ||||
| Component: | New Bugs | Assignee: | Benjamin Poulain <benjamin> | ||||
| Status: | RESOLVED INVALID | ||||||
| Severity: | Normal | ||||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Benjamin Poulain
2014-01-28 17:39:04 PST
Created attachment 222536 [details]
Patch
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? (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 on attachment 222536 [details]
Patch
Simon pointed out this is incomplete.
I fixed that somewhere else IIRC. |