Closed Bug 1421460 Opened 2 years ago Closed 2 years ago

The restore icon should be visible at first paint

Categories

(Firefox :: General, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
Firefox 59
Tracking Status
firefox59 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(2 files)

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.
Blocks: 1421456
Attached patch PatchSplinter Review
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 florian@queze.net:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6077bd474ddd
restore icon should be visible at first paint, r=johannh.
https://hg.mozilla.org/mozilla-central/rev/6077bd474ddd
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
You need to log in before you can comment on or make changes to this bug.