Repository navigation
Rename 'intrinsic dimensions' to 'natural dimensions' to match CSS - #8175
Conversation
|
This is blocking #8008 |
domenic
left a comment
There was a problem hiding this comment.
I admit I started skimming toward the middle, but this seems good... The only thing I worry about is if CSS's "natural width" = our definition of "natural width", or if it = our "density-corrected 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 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? |
|
Maybe there's a bug for the case where that is null, where the pixel density shouldn't be applied. Filed #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
|
|
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. |
0dfca87 to
2912e87
Compare
|
Added a note and rebased to resolve conflicts. |
annevk
left a comment
There was a problem hiding this comment.
This largely looks okay now, but I found a couple places that could be improved.
|
@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 |
|
@annevk sure |
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 )