WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
146825
Safari page goes blank after suspending and resuming with an alert open
https://bugs.webkit.org/show_bug.cgi?id=146825
Summary
Safari page goes blank after suspending and resuming with an alert open
chenwenhong
Reported
2015-07-09 22:37:04 PDT
1、open a webpage in safari 2、trigger alert 3、press home button set safari app into background mode 4、click safari app icon to resume,the result is webpage is empty behind the alert view controller. recovered when dismiss the alert
Attachments
Add attachment
proposed patch, testcase, etc.
Justin
Comment 1
2015-11-13 13:20:47 PST
This is also happening with Chromium in WKWebView mode in iOS9.
Ali Juma
Comment 2
2018-11-28 11:09:44 PST
What's happening is that when Safari is resumed, the WebProcess is blocked on a sync IPC (see WebChromeClient::runJavaScriptAlert) waiting for the alert to be dismissed. In the UIProcess, the RemoteLayerTreeDrawingAreaProxy detaches the root layer after Safari goes into the background (see hideContentUntilPendingUpdate), so when Safari is resumed the UIProcess has no layer tree to draw from until the next composited layer flush. And the WebProcess is blocked until the alert is dismissed, so we can't flush until that happens. Having a way to persist the snapshot that's taken when the app goes into the background (so that it continues to be displayed until the alert is dismissed) might be a way to fix this, but not sure if it's worth the complexity for this edge case.
Radar WebKit Bug Importer
Comment 3
2018-11-28 13:49:17 PST
<
rdar://problem/46320427
>
Tim Horton
Comment 4
2018-11-28 13:59:00 PST
(In reply to Ali Juma from
comment #2
)
> What's happening is that when Safari is resumed, the WebProcess is blocked > on a sync IPC (see WebChromeClient::runJavaScriptAlert) waiting for the > alert to be dismissed. In the UIProcess, the RemoteLayerTreeDrawingAreaProxy > detaches the root layer after Safari goes into the background (see > hideContentUntilPendingUpdate), so when Safari is resumed the UIProcess has > no layer tree to draw from until the next composited layer flush. And the > WebProcess is blocked until the alert is dismissed, so we can't flush until > that happens. > > Having a way to persist the snapshot that's taken when the app goes into the > background (so that it continues to be displayed until the alert is > dismissed) might be a way to fix this, but not sure if it's worth the > complexity for this edge case.
That snapshot is not of the page content, but the whole app (including the alert), so keeping it up would be problematic w.r.t. actually being able to dismiss the alert. Really what you'd want is a snapshot of the page content that you could pop in in place of the layer tree before you've had a chance to get another commit in (including repainted tiles), but I think I agree that that's pretty expensive for a rare edge case.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug