Closed Bug 1817360 Opened 2 years ago Closed 2 years ago

Lazily load broken image icons.

Categories

(Core :: Layout: Images, Video, and HTML Frames, task)

task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(3 files)

No description provided.

With the patches of bug 1815229, these errors appear:

browser/base/content/test/performance/browser_startup_images.js | Loaded image resource://gre-resources/loading-image.png should have been shown

Looks like a legit bug!

  • Use static prefs.
  • Move IconLoad to the cpp file since it's only used in one translation
    unit.

This is in preparation to make the image loads lazy.

This pref has been false since forever, completely untested, and I see
no references to it anywhere. I'm pretty sure having a loading image
placeholder wouldn't be web compatible, particularly in the current days
with all the lazy-loading shenanigans etc.

I propose just removing this code, and simplifying surrounding code for
clarity.

Depends on D170157

With the patches of bug 1815229, these errors appear:

browser/base/content/test/performance/browser_startup_images.js | Loaded image resource://gre-resources/loading-image.png should have been shown

It's a real issue, where we eagerly load the broken image icon and so on
even though we don't use them.

This fixes it by lazily-loading the icon once, only when needed.

Depends on D170158

Keywords: leave-open
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4f024e2fa75f Clean-up image icon loading code. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/aff89f104ac9 Remove browser.display.show_loading_image_placeholder. r=tnikkel
Pushed by ctuns@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/484c8de8d2f5 Remove no-longer relevant exception from browser_startup_images.js

Does this still need to be open?

Flags: needinfo?(emilio)

Yes, last patch still needs to land.

Flags: needinfo?(emilio)
Keywords: leave-open
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/a18068f374df Fix missing file in layout_reftests_with_caret.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Regressions: 1827318
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: