RESOLVED FIXED 131860
[iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
https://bugs.webkit.org/show_bug.cgi?id=131860
Summary [iOS] REGRESSION (r167039): WebKit incorrectly sets a background process asse...
Andy Estes
Reported 2014-04-18 15:14:15 PDT
[iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
Attachments
Patch (1.59 KB, patch)
2014-04-18 15:18 PDT, Andy Estes
thorton: review+
Andy Estes
Comment 1 2014-04-18 15:14:34 PDT
Andy Estes
Comment 2 2014-04-18 15:18:08 PDT
Tim Horton
Comment 3 2014-04-18 15:23:39 PDT
Comment on attachment 229678 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=229678&action=review > Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm:130 > - return [m_contentView window]; > + return [m_webView window]; We also need to notify the view state that it needs to recompute when WKWebView goes into/out of window, just like WKContentView does: WKWebView - (void)didMoveToWindow { _page->viewStateDidChange(ViewState::IsInWindow); }
Tim Horton
Comment 4 2014-04-18 15:25:49 PDT
Comment on attachment 229678 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=229678&action=review >> Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm:130 >> + return [m_webView window]; > > We also need to notify the view state that it needs to recompute when WKWebView goes into/out of window, just like WKContentView does: > WKWebView > > - (void)didMoveToWindow > { > _page->viewStateDidChange(ViewState::IsInWindow); > } And the reason is, we want to background e.g. the network process if you have a PDF currently loaded and then remove the WKWebView (so the WKContentView didMoveToWindow won't get called, and won't viewStateDidChange, so WKWebView has to do it). There's also no real reason to do it in WKContentView's didMoveToWindow, since it will only change on WKWebView's.
Andy Estes
Comment 5 2014-04-18 15:49:09 PDT
Note You need to log in before you can comment on or make changes to this bug.