Skip to content

Density-corrected intrinsic width and height when current request's dimensions are unavailable #9023

@zcorpan

Description

@zcorpan

https://html.spec.whatwg.org/commit-snapshots/86a37fed1dc78035c84e2c87b2db44cf5634371d/#images-processing-model

To determine the density-corrected intrinsic width and height of an img element img:​

  1. Let dim be img's current request's preferred density-corrected dimensions.

  2. If dim is null, set dim to img's intrinsic dimensions.

  3. Set dim's width to dim's width divided by img's current request's current pixel density.

  4. Set dim's height to dim's height divided by img's current request's current pixel density.

  5. Return dim.

Before the image is prepared for presentation, dim will be null. Should steps 3 and 4 be skipped in that case?

From #8175 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions