Closed Bug 1421460 Opened 4 years ago Closed 4 years ago
The restore icon should be visible at first paint
The restore icon is intermittently missing on the first window displayed at startup. See attached screenshot. I believe this is caused by the code at https://searchfox.org/mozilla-central/rev/7a8c667bdd2a4a32746c9862356e199627c0896d/browser/base/content/browser.js#1294 which runs right before first paint, which doesn't leave enough time for the restore.svg icon to be loaded off-main thread before we paint. I think this bug is also responsible for bug 1400357.
Setting the sizemode attribute during the DOMContentLoaded event handler instead of during the load event handler fixes the flickering. Unfortunately it isn't enough to prevent the intermittent useless load of maximize.svg caught by the image test. See these try server pushes: - With the attached patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=80e59cc295a8913c82e302e8927d8dfd4538206f - all green :-) - With only the whitelist entry removed: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6a7589f2912cc0d4b954ecf17d2be45b232fd11a - consistently failing browser_startup_flicker.js - With both the flicker and image whitelist entries removed: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ca6ff982f6eb9be1109718d048f9a5b9582feab3 - browser_startup_images.js still fails on maximize.svg for Windows 10. I wonder if there would be a way to set this attribute even earlier to avoid the pointless image load.
Attachment #8937857 - Flags: review?(jhofmann)
Assignee: nobody → florian
Status: NEW → ASSIGNED
Comment on attachment 8937857 [details] [diff] [review] Patch Review of attachment 8937857 [details] [diff] [review]: ----------------------------------------------------------------- Seems good to me (though I haven't tested it). Strange that the image still loads, I'm not sure what's going on there.
Attachment #8937857 - Flags: review?(jhofmann) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/6077bd474ddd restore icon should be visible at first paint, r=johannh.
You need to log in before you can comment on or make changes to this bug.