WKWebView snapshots have the wrong scale after rotation
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Jul 2015 21:34:58 +0000 (21:34 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Jul 2015 21:34:58 +0000 (21:34 +0000)
commitcef67a245f84f977f0027848ab46ccd4c64a5da0
treee28c4389adbda2316ef8a846002fe1692a7ee9dd
parentaf6f884ea716d5a9ca9f631990f04625e85ee218
WKWebView snapshots have the wrong scale after rotation
https://bugs.webkit.org/show_bug.cgi?id=146476
<rdar://problem/18345247>

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
"Coordinate" -> "Coordinates".

(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
Defer any snapshotting that happens during a resize until after
the resize completes. This will ensure that (in the case of an IOSurface
snapshot) the tiles are up to date, and (in the case of a software snapshot)
that our understanding of the scale and scroll offset of the WKContentView
are up to date, so that we can correctly convert from view to content coordinates
in the UI process.

(-[WKWebView _endAnimatedResize]):
Perform the deferred snapshotting after the resize completes.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm