Issue metadata
Sign in to add a comment
|
Embedded SVGs are not rendering without specified width/height set on the root SVG element
Reported by
jimmyam...@gmail.com,
Apr 16 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36 Example URL: http://www.moproseries-k.com/ Steps to reproduce the problem: 1. Embed SVG directly into HTML 2. Set height/width to inner SVG elements (path, circle, etc) 3. Remove any height/width from root SVG element What is the expected behavior? The root SVG element should inherit the height/width of its inner elements (path, circle, etc), as it does in Chrome 49 and other browsers. What went wrong? SVG height/width values are set to 0x0 even when inner elements (path, circle, etc) have width/height values that are set. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 50.0.2661.75 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 21.0 r0
,
Apr 17 2016
,
Apr 18 2016
You are probably looking for a change made after 374908 (known good), but no later than 374911 (first known bad). CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/af3389f58656798babbd93f458b5d2ca356e72a8..cf9216ca4e606990b24cd829e6284c8c4cb64d67 Suspecting a0ec285a1629a9d7a3c62517d4c62106a02fbf70.
,
Apr 18 2016
,
Apr 18 2016
From what I gather, the problem is related to state invalidation of the width/height attributes when attributes are removed or set to invalid values. In the patch that causes this issue <crrev.com/374909> the value zero, previously ignored and treated as no width/height, are now respected as zero. In combination with the pre-existing state invalidation bug, if a page sets a value to zero and then removes the attribute, the zero value is left around and causes the image to shrink to 0x0. The workaround in this case is to either use some other mechanism to hide the SVG than to set width/height attributes to zero (or invalid values), or to explicitly set the width/height attributes to 100% after/instead of removing them. fs tells me that crbug.com/474523 might be the underlying issue that was unfortunately uncovered.
,
Apr 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6cd726f3f3ed5d5fecfe725bb3c85dc2cac39e85 commit 6cd726f3f3ed5d5fecfe725bb3c85dc2cac39e85 Author: fs <fs@opera.com> Date: Tue Apr 19 18:23:18 2016 Improve default value handling for SVGSVGElement.width/height When a length attribute is either removed or set to an invalid value, it would get set to '0'. It should however be set to the initial value specified for the attribute (possibly presentation attribute) in question. The test svg/custom/disallow-non-lengths-in-attrs.html is tweaked to accommodate for this. BUG= 604093 Review URL: https://codereview.chromium.org/1901673003 Cr-Commit-Position: refs/heads/master@{#388250} [add] https://crrev.com/6cd726f3f3ed5d5fecfe725bb3c85dc2cac39e85/third_party/WebKit/LayoutTests/svg/custom/attribute-default-value-after-removal-expected.html [add] https://crrev.com/6cd726f3f3ed5d5fecfe725bb3c85dc2cac39e85/third_party/WebKit/LayoutTests/svg/custom/attribute-default-value-after-removal.html [modify] https://crrev.com/6cd726f3f3ed5d5fecfe725bb3c85dc2cac39e85/third_party/WebKit/LayoutTests/svg/custom/disallow-non-lengths-in-attrs-expected.txt [modify] https://crrev.com/6cd726f3f3ed5d5fecfe725bb3c85dc2cac39e85/third_party/WebKit/LayoutTests/svg/custom/disallow-non-lengths-in-attrs.html [modify] https://crrev.com/6cd726f3f3ed5d5fecfe725bb3c85dc2cac39e85/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
,
Apr 20 2016
,
Apr 25 2016
,
Apr 25 2016
Your change meets the bar and is auto-approved for M51 (branch: 2704)
,
Apr 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/20a1e339aeac762f323b93575c6cbad86f88cfbb commit 20a1e339aeac762f323b93575c6cbad86f88cfbb Author: Fredrik Söderquist <fs@opera.com> Date: Mon Apr 25 08:27:38 2016 Improve default value handling for SVGSVGElement.width/height When a length attribute is either removed or set to an invalid value, it would get set to '0'. It should however be set to the initial value specified for the attribute (possibly presentation attribute) in question. The test svg/custom/disallow-non-lengths-in-attrs.html is tweaked to accommodate for this. BUG= 604093 Review URL: https://codereview.chromium.org/1901673003 Cr-Commit-Position: refs/heads/master@{#388250} (cherry picked from commit 6cd726f3f3ed5d5fecfe725bb3c85dc2cac39e85) Review URL: https://codereview.chromium.org/1918753002 . Cr-Commit-Position: refs/branch-heads/2704@{#210} Cr-Branched-From: 6e53600def8f60d8c632fadc70d7c1939ccea347-refs/heads/master@{#386251} [add] https://crrev.com/20a1e339aeac762f323b93575c6cbad86f88cfbb/third_party/WebKit/LayoutTests/svg/custom/attribute-default-value-after-removal-expected.html [add] https://crrev.com/20a1e339aeac762f323b93575c6cbad86f88cfbb/third_party/WebKit/LayoutTests/svg/custom/attribute-default-value-after-removal.html [modify] https://crrev.com/20a1e339aeac762f323b93575c6cbad86f88cfbb/third_party/WebKit/LayoutTests/svg/custom/disallow-non-lengths-in-attrs-expected.txt [modify] https://crrev.com/20a1e339aeac762f323b93575c6cbad86f88cfbb/third_party/WebKit/LayoutTests/svg/custom/disallow-non-lengths-in-attrs.html [modify] https://crrev.com/20a1e339aeac762f323b93575c6cbad86f88cfbb/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
,
Apr 25 2016
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by jadiagau...@gmail.com
, Apr 16 2016