Rename 'intrinsic dimensions' to 'natural dimensions' to match CSS
Fixes #6233.
/canvas.html ( diff ) /dnd.html ( diff ) /embedded-content-other.html ( diff ) /embedded-content.html ( diff ) /imagebitmap-and-animations.html ( diff ) /images.html ( diff ) /infrastructure.html ( diff ) /input.html ( diff ) /media.html ( diff ) /references.html ( diff ) /rendering.html ( diff )
This is blocking #8008
if CSS's "natural width" = our definition of "natural width"
AFAICT that's the case.
@tabatkins would you like to review this, to verify it still makes sense from CSS's point of view?
CSS isn't sufficiently well-specified here, but afaict we do intend for "natural dimensions" to refer to the density-corrected values. See, for example, https://w3c.github.io/csswg-drafts/css-images-4/#preferred-resolution. And in general we use "natural dimensions" when doing things like sizing, which definitely uses the density-corrected values or else it would be nonsensical.
@tabatkins density-corrected from information in the image, or from srcset?
HTML defines "density-corrected natural width and height" for images by dividing natural dimensions by current pixel density: https://whatpr.org/html/8175/ba579d7...74081ef/images.html#density-corrected-natural-width-and-height
The way natural dimensions read to me is as if they are in CSS pixels. Especially given the examples given. I don't think that's accurate for what we want here.
Yeah, same as "intrinsic dimensions" before. Why is it not what we want?
How would that make sense for https://html.spec.whatwg.org/#density-corrected-intrinsic-width-and-height, for instance? Or perhaps the problem is that it doesn't make sense today?
~The width and height in step 1 are the width and height of the image in image pixels.~ Edit: reading the spec again, step 1 applies density correction from EXIF, and gives a number in CSS pixels.
Maybe there's a bug for the case where that is null, where the pixel density shouldn't be applied. Filed https://github.com/whatwg/html/issues/9023
Maybe step 2 in https://html.spec.whatwg.org/#images-processing-model:preferred-density-corrected-dimensions should say "physical dimensions" (new term) instead of "natural dimensions" (or currently, "intrinsic dimensions"), defined as step 2 in https://html.spec.whatwg.org/#preparing-an-image-for-presentation:preferred-density-corrected-dimensions
the width and height obtained from req's image data, as defined by the relevant codec.
I don't think we should add a new term. It seems like "natural dimensions" would be correct for step 2, but some context as per #9023 in a note would help make it more understandable what is going on.
Added a note and rebased to resolve conflicts.
@annevk thanks, fixed. I found some more "natural dimensions" that should be "density-corrected natural width and height" and fixed them also.
@zcorpan can we move the IDs to the <dfn>? If you're done with this PR I'm happy to do it before merging.
@annevk sure