New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 776710 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Loading an SVG with 0x0 intrinsic dimensions dispatches 'error' rather than 'load'

Project Member Reported by f...@opera.com, Oct 20 2017

Issue description

Loading this simple, useless but valid, SVG:

  <svg xmlns='http://www.w3.org/2000/svg' width='0' height='0'></svg>

appears to yield an 'error' event rather than the expected 'load' event.

TC: https://jsfiddle.net/4jzaw0bf/
 
Owner: shanmug...@samsung.com
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 28 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/13e639e3d29507db1977ac39ce43f224fcb82a79

commit 13e639e3d29507db1977ac39ce43f224fcb82a79
Author: Shanmuga Pandi M <shanmuga.m@samsung.com>
Date: Tue Nov 28 10:07:30 2017

Loading SVG with 0x0 instrinsic dimension should dispatch load event.

Loading SVG with 0x0 instrinsic dimension should dispatch load event
rather than unexpected 'error' event.
As per https://www.w3.org/TR/SVG/struct.html#SVGElementWidthAttribute,
zero intrinsic size SVG is a valid image.

Bug:  776710 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I10f17b7aa2d1a127b7e330b4750e1c8bcbe1965a
Reviewed-on: https://chromium-review.googlesource.com/741104
Commit-Queue: Shanmuga Pandi <shanmuga.m@samsung.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#519635}
[modify] https://crrev.com/13e639e3d29507db1977ac39ce43f224fcb82a79/third_party/WebKit/LayoutTests/external/wpt/2dcontext/drawing-images-to-the-canvas/2d.drawImage.zerosource.image-expected.txt
[add] https://crrev.com/13e639e3d29507db1977ac39ce43f224fcb82a79/third_party/WebKit/LayoutTests/images/image-with-invalid-svg.html
[add] https://crrev.com/13e639e3d29507db1977ac39ce43f224fcb82a79/third_party/WebKit/LayoutTests/images/image-with-zero-size-svg.html
[modify] https://crrev.com/13e639e3d29507db1977ac39ce43f224fcb82a79/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
[modify] https://crrev.com/13e639e3d29507db1977ac39ce43f224fcb82a79/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp

Status: Fixed (was: Started)

Sign in to add a comment