Closed Bug 1618295 Opened 4 years ago Closed 4 years ago

[rel=preload] Update `image::imgLoader` to use `PreloaderBase` and `Document.PreloadService`

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: mayhemer, Assigned: edgar)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

Part of Design documentation for rel=preload

Please follow this “image” type design.

This depends on the PreloaderBase class being implemented. The idea is to let the image load handler (imgRequest) derive from it and let the loader register it in Document.PreloadService.

Other part is to kick the preload as speculative load from inside the HTML5 parser for images.

Note that the image loader will never be called more than once to start a speculative load, neither preload or regular, so there is no need to add any more coalescing than we already have in the HTML5 parser (the caller to the loader) and the image loader itself. The image cache is the internal loader coalescing mechanism and we use it to link speculative loads and actual loads. This will not be changed.

Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Assignee: honzab.moz → echen
Attachment #9137213 - Attachment is obsolete: true
Depends on: 1628727
Attachment #9138616 - Attachment description: Bug 1618295 - Make imgRequest implement and use PreloaderBase to support the preload as speculative load feature, r=tnikkel → Bug 1618295 - (new) Make imgRequest implement and use PreloaderBase to support the preload as speculative load feature, r=tnikkel
Attachment #9138616 - Attachment description: Bug 1618295 - (new) Make imgRequest implement and use PreloaderBase to support the preload as speculative load feature, r=tnikkel → Bug 1618295 - Make imgRequestProxy implement and use PreloaderBase to support the preload as speculative load feature;

(In reply to Edgar Chen [:edgar] from comment #4)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=79f96395bcfaab890e12b5f9c99a19c348f57b02

There will be a lot of failures from the surrounding preload changes too. I'm right now working on cleaning the crashes up along with rebasing of the patches + incorporating your latest patch too. Edit: no, just everything before with preload disabled (at current default).

I filed bug 1635599 for the existing issue with MaybePreLoadImage and IsImageInCache.

Pushed by honzab.moz@firemni.cz:
https://hg.mozilla.org/integration/autoland/rev/13350bb8d726
Add imageSrcset and imageSizes attributes in HTMLLinkElement; r=hsivonen
https://hg.mozilla.org/integration/autoland/rev/9ea0dc474630
Add imagesrcset and imagesizes attribute to the HTML parser; r=hsivonen
https://hg.mozilla.org/integration/autoland/rev/91163f65e128
Make imgRequestProxy implement and use PreloaderBase to support the preload as speculative load feature; r=tnikkel,smaug,mayhemer
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Regressions: 1640332
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: