[webkit-reviews] review granted: [Bug 135187] [iOS][WK2] r171124 is incorrect when the virtual keyboard is up : [Attachment 235339] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 22 22:33:18 PDT 2014


Simon Fraser (smfr) <simon.fraser at apple.com> has granted Benjamin Poulain
<benjamin at webkit.org>'s request for review:
Bug 135187: [iOS][WK2] r171124 is incorrect when the virtual keyboard is up
https://bugs.webkit.org/show_bug.cgi?id=135187

Attachment 235339: Patch
https://bugs.webkit.org/attachment.cgi?id=235339&action=review

------- Additional Comments from Simon Fraser (smfr) <simon.fraser at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=235339&action=review


> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:803
> +    CGFloat maxHorizontalOffset = contentSize.width + contentInsets.right -
scrollViewSize.width;
> +    if (contentOffset.x > maxHorizontalOffset)
> +	   contentOffset.x = maxHorizontalOffset;
> +    CGFloat maxVerticalOffset = contentSize.height + contentInsets.bottom -
scrollViewSize.height;
> +    if (contentOffset.y > maxVerticalOffset)
> +	   contentOffset.y = maxVerticalOffset;
> +    if (contentOffset.x < -contentInsets.left)
> +	   contentOffset.x = -contentInsets.left;
> +    if (contentOffset.y < -contentInsets.top)
> +	   contentOffset.y = -contentInsets.top;
> +    return contentOffset;

std::min()/std::max()?


More information about the webkit-reviews mailing list