RESOLVED FIXED 134623
[iOS][WK2] Black web view after un-suspending process
https://bugs.webkit.org/show_bug.cgi?id=134623
Summary [iOS][WK2] Black web view after un-suspending process
Tim Horton
Reported 2014-07-03 18:20:37 PDT
It is possible to get empty or volatile surfaces on-screen by suspending the process, having the surfaces get marked volatile, having memory pressure and getting the surfaces purged, then un-suspending the process. Since the view never technically left the window, we don't get a commit that reparents the view - indeed, we may not get a commit at all, so the empty/volatile surfaces will linger. We should fix this by forcing a commit when we un-suspend, and also waiting for said commit to come in. We could in the future short-circuit this by having the UI process attempt to make the surfaces non-volatile and only requiring a commit immediately if the visible area is partially covered by empty surfaces, but for now this will work (and we don't really allow the UI process to adjust surface volatility yet). <rdar://problem/17513223>
Attachments
patch (12.08 KB, patch)
2014-07-03 18:36 PDT, Tim Horton
simon.fraser: review+
Tim Horton
Comment 1 2014-07-03 18:36:25 PDT
Simon Fraser (smfr)
Comment 2 2014-07-03 22:10:34 PDT
Comment on attachment 234386 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=234386&action=review > Source/WebKit2/UIProcess/WebPageProxy.cpp:1107 > + m_viewStateChangeWantsReply = (m_viewStateChangeWantsReply == WantsReplyOrNot::DoesWantReply || wantsReplyOrNot == WantsReplyOrNot::DoesWantReply) ? WantsReplyOrNot::DoesWantReply : WantsReplyOrNot::DoesNotWantReply; I feel like the enum is hurting readability in this code. > Source/WebKit2/UIProcess/WebPageProxy.cpp:1176 > #if ENABLE(INPUT_TYPE_COLOR_POPOVER) > - // When leaving the current page, close the popover color well. > - if (m_colorPicker) > - endColorPicker(); > + // When leaving the current page, close the popover color well. > + if (m_colorPicker) > + endColorPicker(); > #endif > #if PLATFORM(IOS) > - // When leaving the current page, close the video fullscreen. > - if (m_videoFullscreenManager) > - m_videoFullscreenManager->requestHideAndExitFullscreen(); > + // When leaving the current page, close the video fullscreen. > + if (m_videoFullscreenManager) > + m_videoFullscreenManager->requestHideAndExitFullscreen(); > #endif > + } Seems like these should be factored into a onLeavingWindow() or something.
Tim Horton
Comment 3 2014-07-03 22:25:53 PDT
Comment on attachment 234386 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=234386&action=review >> Source/WebKit2/UIProcess/WebPageProxy.cpp:1107 >> + m_viewStateChangeWantsReply = (m_viewStateChangeWantsReply == WantsReplyOrNot::DoesWantReply || wantsReplyOrNot == WantsReplyOrNot::DoesWantReply) ? WantsReplyOrNot::DoesWantReply : WantsReplyOrNot::DoesNotWantReply; > > I feel like the enum is hurting readability in this code. Agreed. I would *love* to get rid of it, so I'll do that. >> Source/WebKit2/UIProcess/WebPageProxy.cpp:1176 >> + } > > Seems like these should be factored into a onLeavingWindow() or something. Why not!
Tim Horton
Comment 4 2014-07-03 22:25:57 PDT
Comment on attachment 234386 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=234386&action=review >> Source/WebKit2/UIProcess/WebPageProxy.cpp:1107 >> + m_viewStateChangeWantsReply = (m_viewStateChangeWantsReply == WantsReplyOrNot::DoesWantReply || wantsReplyOrNot == WantsReplyOrNot::DoesWantReply) ? WantsReplyOrNot::DoesWantReply : WantsReplyOrNot::DoesNotWantReply; > > I feel like the enum is hurting readability in this code. Agreed. I would *love* to get rid of it, so I'll do that. >> Source/WebKit2/UIProcess/WebPageProxy.cpp:1176 >> + } > > Seems like these should be factored into a onLeavingWindow() or something. Why not!
Tim Horton
Comment 5 2014-07-04 00:10:49 PDT
Note You need to log in before you can comment on or make changes to this bug.