Should never be reached failure in WebCore::floatValueForLength
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Sep 2016 00:53:39 +0000 (00:53 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Sep 2016 00:53:39 +0000 (00:53 +0000)
commitf3e4f8861cddff6f59346d49edd0bf1a79de1f96
tree664d8b328b15c48a25fd38c0250e1dc1cff9a014
parenta5d76d208d9138ac60fcc562542dcf761f136c32
Should never be reached failure in WebCore::floatValueForLength
https://bugs.webkit.org/show_bug.cgi?id=139397
<rdar://problem/27704376>

Reviewed by Simon Fraser.

Source/WebCore:

floatValueForLength can't resolve unspecified Length types. Filter them out and return 0 as if they were auto.

Test: svg/css/assert-on-non-resolvable-dimension.html

* svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::valueForLength):

LayoutTests:

* svg/css/assert-on-non-resolvable-dimension-expected.txt: Added.
* svg/css/assert-on-non-resolvable-dimension.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205392 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/css/assert-on-non-resolvable-dimension-expected.txt [new file with mode: 0644]
LayoutTests/svg/css/assert-on-non-resolvable-dimension.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/svg/SVGLengthContext.cpp