[iOS] round the scrollview content size to natural numbers
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.