Closed Bug 1695404 Opened 4 years ago Closed 4 years ago

Support the type() function in image-set

Categories

(Core :: CSS Parsing and Computation, task)

task

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox89 --- fixed

People

(Reporter: emilio, Assigned: pierre.tallotte, Mentored)

References

Details

(Keywords: dev-doc-complete)

Attachments

(3 files)

https://drafts.csswg.org/css-images-4/#funcdef-image-set-type.

We need to tweak the struct here to add two members, something like:

has_type: bool,
type: crate::OwnedStr,

The reason to do this rather than using Option<String> or something more rusty is that otherwise the type wouldn't be ffi-compatible.

Then we need to parse it around here and set that appropriately.

Then in the selection code we need to account for that passing the type to do a function like this, and check that all is thread-safe.

For now, we can probably live with trying to select one image if all images are invalid. Further steps could be teaching the image-set code to deal with no image being selected at all, but that seems not necessary really.

I'll work on it.

Assignee: nobody → pierre.tallotte
Mentor: emilio
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4fa9c71b33b2 Support the type() function in image-set. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28554 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

There's no reason to require a null-terminated string in imgLoader.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/12df1f94f215 follow-up: Avoid redundant string copy in Gecko_IsSupportedImageMimeType. r=tnikkel
Pushed by mkmelin@iki.fi: https://hg.mozilla.org/comm-central/rev/2cd12b4884b8 adjust imgLoader::SupportImageWithMimeType call in libmime for changes in bug 1695404. rs=bustage-fix
Upstream PR merged by moz-wptsync-bot

Release notes, BCD and syntax data updated, and docs written.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: