Title: [210340] branches/safari-603-branch/Source/WebKit2
- Revision
- 210340
- Author
- matthew_han...@apple.com
- Date
- 2017-01-05 09:08:56 -0800 (Thu, 05 Jan 2017)
Log Message
Merge r210041. rdar://problem/29593525
Modified Paths
Diff
Modified: branches/safari-603-branch/Source/WebKit2/ChangeLog (210339 => 210340)
--- branches/safari-603-branch/Source/WebKit2/ChangeLog 2017-01-05 17:08:54 UTC (rev 210339)
+++ branches/safari-603-branch/Source/WebKit2/ChangeLog 2017-01-05 17:08:56 UTC (rev 210340)
@@ -1,5 +1,29 @@
2017-01-05 Matthew Hanson <matthew_han...@apple.com>
+ Merge r210041. rdar://problem/29593525
+
+ 2016-12-20 Simon Fraser <simon.fra...@apple.com>
+
+ [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]):
+
+2017-01-05 Matthew Hanson <matthew_han...@apple.com>
+
Merge r209995. rdar://problem/29626731
2016-12-19 Anders Carlsson <ander...@apple.com>
Modified: branches/safari-603-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (210339 => 210340)
--- branches/safari-603-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2017-01-05 17:08:54 UTC (rev 210339)
+++ branches/safari-603-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2017-01-05 17:08:56 UTC (rev 210340)
@@ -4304,6 +4304,18 @@
_page->synchronizeDynamicViewportUpdate();
+ // synchronizeDynamicViewportUpdate() may cause this function to re-enter via _didCommitLayerTree, so check _dynamicViewportUpdateMode again.
+ if (_dynamicViewportUpdateMode == DynamicViewportUpdateMode::NotResizing)
+ return;
+
+ if (!_resizeAnimationView) {
+ // Paranoia. If _resizeAnimationView is null we'll end up setting a zero scale on the content view.
+ ASSERT_NOT_REACHED();
+ _dynamicViewportUpdateMode = DynamicViewportUpdateMode::NotResizing;
+ [_contentView setHidden:NO];
+ return;
+ }
+
NSUInteger indexOfResizeAnimationView = [[_scrollView subviews] indexOfObject:_resizeAnimationView.get()];
[_scrollView insertSubview:_contentView.get() atIndex:indexOfResizeAnimationView];
[_scrollView insertSubview:[_contentView unscaledView] atIndex:indexOfResizeAnimationView + 1];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes