Bug 1470083 Comment 6 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Ryan Jones-Ward [:sciguyryan] from comment #5)
> I have a few questions, if I can pick your brain. Henri indicated that you might know since he's going to be away.
> 
> If you don't know but can point me in the direction of anyone that might, that would be great too.!
> 
> From what I can see there actually seem to be two issues at play here:
> 
> 1. Firefox does not (as far as I can see) download all of the assets for images referenced by srcset. It seems to only download the "selected" image that is currently displayed on the page. If this is intended behaviour then that's fine but then updating the attribute is pointless.

Chrome doesn't download all the assets. I'm not sure what the majority of users wants in this case. Thinking globally, in areas with restricted bandwidth or data volume, this might be undesirable. I wonder how often users download a website and want to view it on another machine.
Jens: do you have an actual use case for this?

I am unsure as to where to amend the code in order to allow it to download all of the assets. I've tried following the chain of execution but didn't succeed in finding where that happens. If anyone knows where this code sits I'd love a pointer. That should probably be fixed in a separate bug anyway as it is related to the issue here, but can be resolved separately I suspect.
> 
> 2. The second is that by the time `nsHTMLContentSerializer::SerializeHTMLAttributes` is called the process of adjusting the URLs seems to have already taken place. In my testcase example the src attribute of "img.png" is already converted into "Testcase_files\img.png" by the time . As with the above I've failed to determine where specifically this occurs.
> 

[The fixup code](https://searchfox.org/mozilla-central/search?q=symbol:_ZN27nsIDocumentEncoderNodeFixup9FixupNodeEP7nsINodePbPS1_&redirect=false) could be relevant.

> I need a newer computer, building Firefox takes way too long. 😂
(In reply to Ryan Jones-Ward [:sciguyryan] from comment #5)
> I have a few questions, if I can pick your brain. Henri indicated that you might know since he's going to be away.
> 
> If you don't know but can point me in the direction of anyone that might, that would be great too.!
> 
> From what I can see there actually seem to be two issues at play here:
> 
> 1. Firefox does not (as far as I can see) download all of the assets for images referenced by srcset. It seems to only download the "selected" image that is currently displayed on the page. If this is intended behaviour then that's fine but then updating the attribute is pointless.

Chrome doesn't download all the assets. I'm not sure what the majority of users wants in this case. Thinking globally, in areas with restricted bandwidth or data volume, this might be undesirable. I wonder how often users download a website and want to view it on another machine.
Jens: do you have an actual use case for this?

> I am unsure as to where to amend the code in order to allow it to download all of the assets. I've tried following the chain of execution but didn't succeed in finding where that happens. If anyone knows where this code sits I'd love a pointer. That should probably be fixed in a separate bug anyway as it is related to the issue here, but can be resolved separately I suspect.
> 
> 2. The second is that by the time `nsHTMLContentSerializer::SerializeHTMLAttributes` is called the process of adjusting the URLs seems to have already taken place. In my testcase example the src attribute of "img.png" is already converted into "Testcase_files\img.png" by the time . As with the above I've failed to determine where specifically this occurs.
> 

[The fixup code](https://searchfox.org/mozilla-central/search?q=symbol:_ZN27nsIDocumentEncoderNodeFixup9FixupNodeEP7nsINodePbPS1_&redirect=false) could be relevant.

> I need a newer computer, building Firefox takes way too long. 😂

Back to Bug 1470083 Comment 6