[iOS WK2] Switching or closing a tab leads to all-white tab content if the status...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Dec 2016 23:32:28 +0000 (23:32 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Dec 2016 23:32:28 +0000 (23:32 +0000)
commit32472de42b329844be9102dfb5e010fee709a279
tree2aedd61388138d17221260ff9f542b814d8de1d2
parent5b0bd2e62e18a04f96807cac5329928fee172b58
[iOS WK2] Switching or closing a tab leads to all-white tab content if the status bar is double height
https://bugs.webkit.org/show_bug.cgi?id=166286
rdar://problem/29593525

Reviewed by Tim Horton.

A double-height status bar triggers view resize while snapshotting in the background,
which also triggers calls to _endAnimatedResize on tab resume. However, it was possible
for _endAnimatedResize to re-enter via synchronizeDynamicViewportUpdate()/didCommitLayerTree(),
causing us to use a nil _resizeAnimationView for scale computations, thus setting a zero
scale on the WKContentView.

Fix by checking _dynamicViewportUpdateMode again after the call to synchronizeDynamicViewportUpdate(),
and do a belt-and-braces check for a nil _resizeAnimationView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _endAnimatedResize]):

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