Bug 204521 - Media queries in img sizes attribute don't evaluate dynamically
Summary: Media queries in img sizes attribute don't evaluate dynamically
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-11-22 09:13 PST by Antti Koivisto
Modified: 2019-11-23 02:20 PST (History)
19 users (show)

See Also:


Attachments
patch (27.37 KB, patch)
2019-11-22 09:34 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (27.37 KB, patch)
2019-11-22 09:41 PST, Antti Koivisto
simon.fraser: review+
Details | Formatted Diff | Diff
patch (27.61 KB, patch)
2019-11-23 01:36 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2019-11-22 09:13:37 PST
There is no code for evaluating on viewport etc changes.
Comment 1 Antti Koivisto 2019-11-22 09:34:42 PST
Created attachment 384160 [details]
patch
Comment 2 Antti Koivisto 2019-11-22 09:41:08 PST
Created attachment 384161 [details]
patch
Comment 3 Simon Fraser (smfr) 2019-11-22 12:47:28 PST
Comment on attachment 384161 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=384161&action=review

> LayoutTests/fast/images/sizes-dynamic-001.html:5
> +<link rel="match" href="sizes-dynamic-001-ref.html">

Please fix this to point to the real ref file.

> LayoutTests/fast/images/sizes-dynamic-002.html:5
> +<link rel="match" href="sizes-dynamic-001-ref.html">

Ditto.

> Source/WebCore/dom/Document.h:1829
> +    HashSet<HTMLImageElement*> m_dynamicMediaQueryDependentImages;

Are we still using raw pointers for stuff like this?
Comment 4 Antti Koivisto 2019-11-22 12:58:03 PST
> Are we still using raw pointers for stuff like this?

We don't have WeakPtrs for Elements yet. But maybe I could add it for HTMLImageElement.
Comment 5 Antti Koivisto 2019-11-23 00:57:08 PST
> We don't have WeakPtrs for Elements yet. But maybe I could add it for
> HTMLImageElement.

I'm wrong, ContainerNodes are already CanMakeWeakPtr.
Comment 6 Antti Koivisto 2019-11-23 01:36:42 PST
Created attachment 384233 [details]
patch
Comment 7 WebKit Commit Bot 2019-11-23 02:19:50 PST
Comment on attachment 384233 [details]
patch

Clearing flags on attachment: 384233

Committed r252828: <https://trac.webkit.org/changeset/252828>
Comment 8 WebKit Commit Bot 2019-11-23 02:19:52 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2019-11-23 02:20:20 PST
<rdar://problem/57451085>