Closed Bug 1695404 Opened 2 years ago Closed 2 years ago

Support the type() function in image-set


(Core :: CSS Parsing and Computation, task)




89 Branch
Tracking Status
firefox89 --- fixed


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



(Keywords: dev-doc-complete)


(3 files)

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
Support the type() function in image-set. r=emilio
Created web-platform-tests PR for changes under testing/web-platform/tests
Closed: 2 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
follow-up: Avoid redundant string copy in Gecko_IsSupportedImageMimeType. r=tnikkel
Pushed by
adjust imgLoader::SupportImageWithMimeType call in libmime for changes in bug 1695404. rs=bustage-fix
Pushed by
follow-up: More tiny cleanup. r=emilio
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.