Closed Bug 1820549 Opened 3 years ago Closed 3 years ago

Remove flicker exception for Firefox View button in browser_tabclose.js and other performance tests

Categories

(Firefox :: Toolbars and Customization, defect, P2)

defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: mconley, Assigned: Gijs)

References

Details

Attachments

(1 file)

Adding an exception to the browser_tabclose.js test. Looking at the two frames showing the flicker (attached), this appears to be from the Firefox View icon. The regressor, bug 1815229, changed some image load timings. It's strange how this is only failing on beta, but given how close we are to the merge, I landed a patch in bug 1819084 to add an exception and filed this bug to investigate a proper fix.

Summary: Flicker caused by delayed load of Firefox View icon → Fix flicker caused by delayed load of Firefox View icon and detected in browser_tabclose.js

This is not about image load timings, see the last patch in the regressing bug.

This is expected because the Firefox View icon is an asynchronously decoded PNG, and nsImageBoxFrame used to eagerly decode all images. Now <xul:image> is only decoded when visible, but the async-ness of this is what that test reveals.

I still think we would like to avoid this for both this and any other toolbar buttons we would want to convert to HTML img instead of XUL. Emilio, is there currently a primitive for this, for chrome code? And/or, is there a principled reason that we wouldn't want to do this? I Understand it would force some things to be sync that aren't right now - but then, they've always worked that way for the browser window so I can't imagine it'd make things any worse than they are today?

From the frontend perspective, these tests exist because ideally we want to paint the complete window in 1 go, instead of having things pop into existence (especially where that causes layout to adjust sizes, which I think isn't the case here). Maybe Florian can say more about this and/or how we'd feel about loading all icons async instead of sync...

Flags: needinfo?(florian)
Flags: needinfo?(emilio)

So load timing (and thus sizing etc) is the same. What causes this is async-decoding (which doesn't block the load event).

We could either use <img decoding="sync"> (which would mean losing the ability of setting the icon via CSS, you'd need to use src or srcset or so), or we could add some sort of internal property a la -moz-force-broken-image-icon which controlled this via CSS or something.

Flags: needinfo?(emilio)

(In reply to :Gijs (he/him) from comment #2)

From the frontend perspective, these tests exist because ideally we want to paint the complete window in 1 go, instead of having things pop into existence (especially where that causes layout to adjust sizes, which I think isn't the case here). Maybe Florian can say more about this and/or how we'd feel about loading all icons async instead of sync...

Agreed with what you wrote. From a perceived performance perspective, having things that move around while loading is the worst. Having things that appear (directly at the right size and position) in chunks is not as bad, but still pretty bad if it's slow enough to be perceivable. If an icon appears a very short amount of time after the window (eg. one frame or so later), and the background color of the area matched the background of the icon, it's mostly imperceptible for a user. But afaik we have no way to enforce the "it will appear one frame later" part, so for our automated tests we have to assume we are in the perceptible case of the icon appearing after a noticeable delay.

Flags: needinfo?(florian)

I believe Tim might be fixing this with bug 1820709.

Depends on: 1820709

Can we just drop the exception from browser_tabclose.js now, and/or maybe other ones? Or is there more to do after 1820709? (I confess to not fully understanding the finer points!)

Flags: needinfo?(emilio)

If they pass without the exception, then sure.

Flags: needinfo?(emilio)

Taking a guess at priority & severity, feel free to adjust

Severity: -- → S3
Priority: -- → P2
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/815543e39c0f try removing fxview icon exception from perf flicker tests r=mconley
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Updating summary for what we actually did here.

Summary: Fix flicker caused by delayed load of Firefox View icon and detected in browser_tabclose.js → Remove flicker detection for Firefox View button in browser_tabclose.js and other performance tests
Summary: Remove flicker detection for Firefox View button in browser_tabclose.js and other performance tests → Remove flicker exception for Firefox View button in browser_tabclose.js and other performance tests
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: