[Bug 23581] The case when @src refers to a image without intrinsic width/height (SVG) is undefined.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23581

David Vest <davve@opera.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|needinfo?(davve@opera.com)  |

--- Comment #4 from David Vest <davve@opera.com> ---
What Blink (and WebKit unless they have changed it recently) does is
pretty broken.

For naturalWidth and naturalHeight, a default 300x150 size is
hard-coded in the svg specific <img> code (yes, separate from the
usual CSS mechanics) and used as a fallback size in case of missing
intrinsic width or height.

In general, the Blink code doesn't handle images with empty sizes well
(a legacy from raster-only images, empty sized images are null and
basically in error), so I presume that's why someone chose 300x150 as
a better size than nothing.

Also, post-fork, Blink has added resolving missing width and height
using the aspect ratio (from viewBox, if any) in a step towards the
default sizing algorithm. I'm not sure WebKit has that.

See
third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg.html[1]
in chromium repo for an example how it manifests. I can only guess
what Firefox does, but they pass the mentioned test.

[1]
https://chromium.googlesource.com/chromium/blink/+/72fef91ac1ef679207f51def8133b336a6f6588f/LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg.html

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Friday, 5 February 2016 07:31:51 UTC