Files
tubestation/dom/base
Daniel Holbert 3d163cc822 Bug 1965560 part 4: Adjust img.width/img.height internals to return the naturalWidth and naturalHeight when the img is not being rendered. a=RyanVM
This is to implement the spec text here, where the spec defines the IDL
attributes width and height in terms of the natural width and height when the
image is not being rendered:
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-width

This patch diverges from that^ spec text in two key ways, for interoperability,
as described in this github comment:
https://github.com/whatwg/html/issues/11287#issuecomment-2923467541

I've called these out in the code itself, and I intend to update the spec to
address this divergence in that whatwg/html github-issue.

Original Revision: https://phabricator.services.mozilla.com/D251988

Differential Revision: https://phabricator.services.mozilla.com/D267128
2025-10-02 01:02:10 +00:00
..