Closed Bug 1266690 Opened 8 years ago Closed 8 years ago

<img> spec runs a separate algorithm for relevant mutations and viewport changed

Categories

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

x86
Windows 8
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1268182

People

(Reporter: edgar, Assigned: edgar)

Details

(Whiteboard: [tw-dom] btpp-fixlater)

+++ This bug was initially created as a clone of Bug #1134194 comment #148 +++

Currently we share the same logic for relevant mutations and viewport changed. But the spec runs a separate algorithm for them ([1] and [2]).

[1] https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element:update-the-image-data
[2] https://html.spec.whatwg.org/multipage/embedded-content.html#img-environment-changes
I believe we previously tried to differentiate the "update the image data" implementation from the "environment changes" one via the aAlwaysLoad argument to QueueImageLoadTask. MediaFeatureValuesChanged (which is the callback for the viewport changing) passes false here, unlike most of the other callers.
Whiteboard: [tw-dom] btpp-fixlater
(In reply to Josh Matthews [:jdm] from comment #1)
> I believe we previously tried to differentiate the "update the image data"
> implementation from the "environment changes" one via the aAlwaysLoad
> argument to QueueImageLoadTask. MediaFeatureValuesChanged (which is the
> callback for the viewport changing) passes false here, unlike most of the
> other callers.

Ah, yes, you are right. Thanks for the clarification.
Then I think what we need to do here is taking URL and pixel density into consideration in UpdateResponsiveSource, e.g., returns false if selected URL and pixel density are the same as the element's last selected source and current pixel density. See step 5 of https://html.spec.whatwg.org/multipage/embedded-content.html#img-environment-changes.
Assignee: nobody → echen
bug 1268182 implements step 5 of https://html.spec.whatwg.org/multipage/embedded-content.html#img-environment-changes. Mark this bug as duplicated of bug 1268182.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.