RESOLVED FIXED 187504
REGRESSION (r233480): Mail contents flash black when activating
https://bugs.webkit.org/show_bug.cgi?id=187504
Summary REGRESSION (r233480): Mail contents flash black when activating
Tim Horton
Reported 2018-07-09 20:35:00 PDT
REGRESSION (r233480): Mail contents flash black when activating Mail
Attachments
Patch (2.95 KB, patch)
2018-07-09 20:35 PDT, Tim Horton
mitz: review+
Patch (10.20 KB, patch)
2018-07-10 17:54 PDT, Tim Horton
no flags
Patch (12.53 KB, patch)
2018-07-10 22:42 PDT, Tim Horton
no flags
Tim Horton
Comment 1 2018-07-09 20:35:15 PDT
Tim Horton
Comment 2 2018-07-09 20:35:28 PDT
mitz
Comment 3 2018-07-09 20:42:42 PDT
Comment on attachment 344658 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344658&action=review > Source/WebKit/UIProcess/ApplicationStateTracker.mm:100 > + m_didCreateWindowContextObserver = [notificationCenter addObserverForName:@"_UICanvasDidActivateNotification" object:window._canvas queue:nil usingBlock:[weakThis](NSNotification *) { This is repeating the mistake of hardcoding a string instead of importing a symbol.
Tim Horton
Comment 4 2018-07-09 21:17:39 PDT
(In reply to mitz from comment #3) > Comment on attachment 344658 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=344658&action=review > > > Source/WebKit/UIProcess/ApplicationStateTracker.mm:100 > > + m_didCreateWindowContextObserver = [notificationCenter addObserverForName:@"_UICanvasDidActivateNotification" object:window._canvas queue:nil usingBlock:[weakThis](NSNotification *) { > > This is repeating the mistake of hardcoding a string instead of importing a > symbol. Sadly I have learned no lessons because that wouldn’t have saved us last time...
Simon Fraser (smfr)
Comment 5 2018-07-09 22:13:03 PDT
Comment on attachment 344658 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344658&action=review >>> Source/WebKit/UIProcess/ApplicationStateTracker.mm:100 >>> + m_didCreateWindowContextObserver = [notificationCenter addObserverForName:@"_UICanvasDidActivateNotification" object:window._canvas queue:nil usingBlock:[weakThis](NSNotification *) { >> >> This is repeating the mistake of hardcoding a string instead of importing a symbol. > > Sadly I have learned no lessons because that wouldn’t have saved us last time... Can we just use some public "app will come to the foreground" notification?
Tim Horton
Comment 6 2018-07-09 22:42:38 PDT
I’m sure there’s some reason I didn’t use UIApplicationWillEnterForegroundNotification in the original patch, but I will check why :)
Tim Horton
Comment 7 2018-07-09 23:11:51 PDT
(In reply to Tim Horton from comment #6) > I’m sure there’s some reason I didn’t use > UIApplicationWillEnterForegroundNotification in the original patch, but I > will check why :) There totally is. We need to be awoken and blanked out in snapshots that happen in the background. But now I don’t know if this patch is enough. Will continue investigating.
mitz
Comment 8 2018-07-09 23:13:13 PDT
Don’t forget app extensions and view services!
Tim Horton
Comment 9 2018-07-10 16:38:35 PDT
Sadly, this is insufficient.
Tim Horton
Comment 10 2018-07-10 17:54:30 PDT
Simon Fraser (smfr)
Comment 11 2018-07-10 18:58:44 PDT
Comment on attachment 344741 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344741&action=review Please make it build. > Source/WebKit/ChangeLog:15 > + The point of hiding the web view's contents in didCreateWindowContext > + was to ensure we did not hide it before the initial background snapshot > + (so that in the case of simple app, the background snapshot contains all > + WKWebViews), but then hide it if the app was reawoken in the background > + for snapshot updates (because layer contents could be emptied at that point), > + or (at the latest) when the app itself comes back to the foreground (for > + the same reason). This is hard to understand.
Tim Horton
Comment 12 2018-07-10 19:15:19 PDT
I will try to make it easier to understand. If only I could draw pictures. Maybe I can!
Tim Horton
Comment 13 2018-07-10 19:16:03 PDT
I seem to have missed a piece of “remove the old thing”
Tim Horton
Comment 14 2018-07-10 22:42:31 PDT
Tim Horton
Comment 15 2018-07-10 22:43:15 PDT
(In reply to Simon Fraser (smfr) from comment #11) > This is hard to understand. I really hope this is better :) At least, it will be good if we need to look back on the problem again in the future.
WebKit Commit Bot
Comment 16 2018-07-10 23:22:21 PDT
Comment on attachment 344754 [details] Patch Clearing flags on attachment: 344754 Committed r233723: <https://trac.webkit.org/changeset/233723>
WebKit Commit Bot
Comment 17 2018-07-10 23:22:22 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.