Open
Bug 893916
Opened 12 years ago
Updated 2 months ago
Consider starting image loads async if we can
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
NEW
People
(Reporter: bzbarsky, Unassigned)
References
Details
It's not clear to me how we can do that given that image cache _hits_ need to be synchronous....
![]() |
Reporter | |
Comment 1•12 years ago
|
||
Unless we decouple checking the image cache from doing the image load somehow?
Flags: needinfo?(joe)
Comment 2•12 years ago
|
||
I need more context. :) What do you want to start asynchronously? The network load? The decode? Both?
Flags: needinfo?(joe) → needinfo?(bzbarsky)
![]() |
Reporter | |
Comment 3•12 years ago
|
||
As much as we can. Basically, see bug 893113.
Flags: needinfo?(bzbarsky)
![]() |
Reporter | |
Comment 4•12 years ago
|
||
So specifically, here's a list of things I want to do async:
1) CheckLoadURI checks
2) Content policy checks.
That means the asyncOpen needs to be async too.
But if things are in the image cache, I need to know that sync...
Flags: needinfo?(joe)
Comment 5•12 years ago
|
||
It wouldn't be terribly hard to do that. Of course we can't always respond that something is definitely in the cache, if we need to do an If-Modified-Since, but as long as it's OK for some "cache hits" to be asynchronous we should be OK.
Although - why do cache hits even need to be synchronous? Leaving aside the HTML5 parser's preloading, what do you need on an imgIRequest that we wouldn't be able to give?
Flags: needinfo?(joe)
![]() |
Reporter | |
Comment 6•12 years ago
|
||
Right; we just need the "preloaded image" case to be sync.
> why do cache hits even need to be synchronous?
Becuase of web compat. Specifically, the .with and .height of the HTMLImageElement need to synchronously change to the new value if the image is preloaded in a situation like this:
var img = new Image();
img.src = somethingIPreloaded;
var width = img.width;
etc. See bug 721659.
Comment 7•12 years ago
|
||
Right. Crap.
![]() |
Reporter | |
Comment 8•9 years ago
|
||
Seth, do you know who might have time to take this on?
Note that this might also be complicated by the outcome of the security work Christoph has been doing and how the results of the security checks are communicated to HTMLImageElement. As in, we may need to restructure the imgloader API to have explicit ways to do the cache hit check (sync) and then the actual load (started async from ImageLoadingContent) code, instead of just having imagelib put work off async...
Flags: needinfo?(seth)
Updated•7 years ago
|
Priority: -- → P5
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•3 years ago
|
Severity: normal → S3
Comment 9•2 years ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE
.
For more information, please visit auto_nag documentation.
Flags: needinfo?(seth.bugzilla)
Comment 10•2 months ago
|
||
is this fixed now?
You need to log in
before you can comment on or make changes to this bug.
Description
•