[webkit-dev] Calculate img/video aspect ratio from width and height HTML attributes

Frédéric Wang fwang at igalia.com
Thu Dec 19 05:22:49 PST 2019


In  [1], we will try and make WebKit rely on the width and height HTML
attributes of the <img> and <video> elements in order to determine their
aspect ratio, so that it can be used for sizing the image using CSS,
before the content loads.

HTML and CSS standardization groups already reached consensus on this
proposal [2] and there are WPT tests for it. Moreover this is already
shipped in Gecko [3] and Chromium [4].

[1] https://bugs.webkit.org/show_bug.cgi?id=201641
[2] https://github.com/WICG/intrinsicsize-attribute/issues/16

Frédéric Wang

More information about the webkit-dev mailing list