Summary: We do this for <img> already, and HTML was changed a while ago
to do this for <video> / <canvas> / <input type=image>.
It seems like an uncontroversial change.
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1700640
Standard:
https://html.spec.whatwg.org/#attributes-for-embedded-content-and-images
> The width and height attributes map to the aspect-ratio property on
img, canvas, and video elements, and input elements with a type
attribute in the Image Button state.
There are some edge cases about <canvas> and zero-valued attributes
which I've filed as https://github.com/whatwg/html/issues/6527.
Platform coverage: all
DevTools bug: N/A
Other browsers:
* Chrome: They implement that though I don't know if it's shipped or
not (https://chromium-review.googlesource.com/c/chromium/src/+/2642857 /
https://chromium-review.googlesource.com/c/chromium/src/+/2650135 /
https://chromium-review.googlesource.com/c/chromium/src/+/2690929).
* Safari: They only implement <img> I _think_.
There's another follow-up change we need to implement which is
supporting it in <source> elements for <picture>, but that's a more
involved change.
web-platform-tests:
https://wpt.fyi/results/html/rendering/replaced-elements/attributes-for-embedded-content-and-images?label=master&label=experimental&aligned
-- Emilio
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform