wpt/css/css-images/gradient/color-stops-parsing.html crashes
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2019 17:03:34 +0000 (17:03 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 22 Oct 2019 17:03:34 +0000 (17:03 +0000)
commitdce85e3e37ca69cf93ebb0a931425d54ff35068e
tree816b8abab5feea820b5c693aa87375a0d238fd19
parent19ea597bab364c333a720a5a30042696cf30b304
wpt/css/css-images/gradient/color-stops-parsing.html crashes
https://bugs.webkit.org/show_bug.cgi?id=200206

Reviewed by Carlos Alberto Lopez Perez.

LayoutTests/imported/w3c:

* web-platform-tests/css/css-images/gradient/color-stops-parsing-expected.txt:

Source/WebCore:

Share the code that writes color stops, and null-check the stop's m_color.

Tested by http/wpt/css/css-images/gradient/color-stops-parsing.html.

* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::writeColorStop const):
(WebCore::CSSLinearGradientValue::customCSSText const):
(WebCore::CSSRadialGradientValue::customCSSText const):
(WebCore::CSSConicGradientValue::customCSSText const):
* css/CSSGradientValue.h:
(WebCore::CSSGradientValue::CSSGradientValue):

LayoutTests:

Unskip the test. It fails, but no longer crashes.

* TestExpectations:
* imported/w3c/web-platform-tests/css/css-images/gradient/color-stops-parsing-expected.txt: Added.
* platform/mac-highsierra/imported/w3c/web-platform-tests/css/css-images/gradient/color-stops-parsing-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/css-images/gradient/color-stops-parsing-expected.txt
LayoutTests/platform/mac-highsierra/imported/w3c/web-platform-tests/css/css-images/gradient/color-stops-parsing-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSGradientValue.h