[Webkit-unassigned] [Bug 201641] Using HTML width and height atrribute to compute the aspect ratio of img/video

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 28 23:54:29 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=201641

Manuel Rego Casasnovas <rego at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rego at igalia.com

--- Comment #6 from Manuel Rego Casasnovas <rego at igalia.com> ---
(In reply to Emilio Cobos Álvarez (:emilio) from comment #5)
> That is a completely different thing. That's about an intrinsic-size CSS
> property, that did something fairly different.

Yes, I agree with Emilio here.

This has been fixed and shipped in Firefox and Chromium:
* https://bugzilla.mozilla.org/show_bug.cgi?id=1547231
* https://bugs.chromium.org/p/chromium/issues/detail?id=979891

The spec text can be found at:
https://html.spec.whatwg.org/multipage/rendering.html#attributes-for-embedded-content-and-images
  "
   The intrinsic aspect ratio for an img element img is computed as follows:
     1. If img's current request is available and has an intrinsic aspect ratio, then use that intrinsic aspect ratio.
     2. If img's width and height attribute values, when parsed using the rules for parsing dimension values, are both not an error, not a percentage, and non-zero, then use the ratio resulting from dividing the width attribute value by the height attribute value.
     3. Otherwise, img has no intrinsic aspect ratio.
  "

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191129/d028e41a/attachment.htm>


More information about the webkit-unassigned mailing list