Blink renders nothing, if SVG viewBox is explicitly empty |
||||
Issue descriptionVersion: Version 52.0.2716.0 dev (64-bit) OS: Ubuntu 16.04 What steps will reproduce the problem? (1) Load attached SVG file. What is the expected output? Lime rect should be visible. What do you see instead? Blank viewport -- nothing is rendered. Notes: The testcase has an explicitly empty (i.e. invalid) "viewBox" attribute on the <svg> element. If I remove that attribute, then I get the expected output. Firefox 46, Edge 13, Safari 9 all produce my expected output here -- I believe Blink is alone in rendering the attached testcase as blank.
,
May 2 2016
,
May 3 2016
SVGRect::setValueAsString() treats an empty string as a valid empty viewBox, causing us to abort rendering early on. Not sure if this behavior is new with https://codereview.chromium.org/132233010 or if's older. If it's new that would explain why Safari 9 doesn't behave the same.
,
May 3 2016
Yes, looks like that could be source/cause (SVGFitToViewBox::parseViewBox and descendants being the thing to look at.)
,
Jun 1 2016
,
Jun 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7d1027c45036b7da5389faa99e3b54209398a3c1 commit 7d1027c45036b7da5389faa99e3b54209398a3c1 Author: shanmuga.m <shanmuga.m@samsung.com> Date: Fri Jun 03 17:12:30 2016 Empty SVG viewbox should be treated invalid If SVG viewbox is explicitly empty, it should be treated as invalid value. BUG= 608413 Review-Url: https://codereview.chromium.org/2037573002 Cr-Commit-Position: refs/heads/master@{#397735} [modify] https://crrev.com/7d1027c45036b7da5389faa99e3b54209398a3c1/third_party/WebKit/LayoutTests/html5lib/generated/run-tests11-data-expected.txt [modify] https://crrev.com/7d1027c45036b7da5389faa99e3b54209398a3c1/third_party/WebKit/LayoutTests/html5lib/generated/run-tests11-write-expected.txt [modify] https://crrev.com/7d1027c45036b7da5389faa99e3b54209398a3c1/third_party/WebKit/LayoutTests/imported/wpt/html/syntax/parsing/html5lib_tests11-expected.txt [add] https://crrev.com/7d1027c45036b7da5389faa99e3b54209398a3c1/third_party/WebKit/LayoutTests/svg/custom/empty-viewbox-attr-expected.svg [add] https://crrev.com/7d1027c45036b7da5389faa99e3b54209398a3c1/third_party/WebKit/LayoutTests/svg/custom/empty-viewbox-attr.svg [modify] https://crrev.com/7d1027c45036b7da5389faa99e3b54209398a3c1/third_party/WebKit/Source/core/svg/SVGRect.cpp
,
Jun 6 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by dholb...@gmail.com
, May 2 2016