Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (276202 => 276203)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-17 18:22:35 UTC (rev 276202)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-04-17 19:02:05 UTC (rev 276203)
@@ -1,3 +1,17 @@
+2021-04-17 Tim Nguyen <[email protected]>
+
+ Don't omit conic gradient starting angle when serializing when starting angle is under 0
+ https://bugs.webkit.org/show_bug.cgi?id=224719
+
+ Reviewed by Ryosuke Niwa.
+
+ Updated pre-existing test to cover this case.
+
+ Test: LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html
+
+ * web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub-expected.txt:
+ * web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html:
+
2021-04-16 Cameron McCormack <[email protected]>
Place vertical scrollbars at (inline/block)-end edge in all writing modes.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub-expected.txt (276202 => 276203)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub-expected.txt 2021-04-17 18:22:35 UTC (rev 276202)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub-expected.txt 2021-04-17 19:02:05 UTC (rev 276203)
@@ -29,4 +29,8 @@
FAIL Property background-image value 'conic-gradient(from 45deg at center, red, blue)' assert_equals: expected "conic-gradient(from 45deg, rgb(255, 0, 0), rgb(0, 0, 255))" but got "conic-gradient(from 45deg, red, blue)"
FAIL Property background-image value 'conic-gradient(from 45deg at 50%, red, blue)' assert_equals: expected "conic-gradient(from 45deg, rgb(255, 0, 0), rgb(0, 0, 255))" but got "conic-gradient(from 45deg, red, blue)"
FAIL Property background-image value 'conic-gradient(from 45deg at 10px 10px, red, blue)' assert_equals: expected "conic-gradient(from 45deg at 10px 10px, rgb(255, 0, 0), rgb(0, 0, 255))" but got "conic-gradient(from 45deg at 10px 10px, red, blue)"
+PASS Property background-image value 'conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))'
+FAIL Property background-image value 'conic-gradient(from -45deg at center, red, blue)' assert_equals: expected "conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))" but got "conic-gradient(from -45deg, red, blue)"
+FAIL Property background-image value 'conic-gradient(from -45deg at 50%, red, blue)' assert_equals: expected "conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))" but got "conic-gradient(from -45deg, red, blue)"
+FAIL Property background-image value 'conic-gradient(from -45deg at 10px 10px, red, blue)' assert_equals: expected "conic-gradient(from -45deg at 10px 10px, rgb(255, 0, 0), rgb(0, 0, 255))" but got "conic-gradient(from -45deg at 10px 10px, red, blue)"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html (276202 => 276203)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html 2021-04-17 18:22:35 UTC (rev 276202)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html 2021-04-17 19:02:05 UTC (rev 276203)
@@ -54,6 +54,10 @@
test_computed_value('background-image', 'conic-gradient(from 45deg at center, red, blue)', 'conic-gradient(from 45deg, rgb(255, 0, 0), rgb(0, 0, 255))');
test_computed_value('background-image', 'conic-gradient(from 45deg at 50%, red, blue)', 'conic-gradient(from 45deg, rgb(255, 0, 0), rgb(0, 0, 255))');
test_computed_value('background-image', 'conic-gradient(from 45deg at 10px 10px, red, blue)', 'conic-gradient(from 45deg at 10px 10px, rgb(255, 0, 0), rgb(0, 0, 255))');
+test_computed_value('background-image', 'conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))');
+test_computed_value('background-image', 'conic-gradient(from -45deg at center, red, blue)', 'conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))');
+test_computed_value('background-image', 'conic-gradient(from -45deg at 50%, red, blue)', 'conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))');
+test_computed_value('background-image', 'conic-gradient(from -45deg at 10px 10px, red, blue)', 'conic-gradient(from -45deg at 10px 10px, rgb(255, 0, 0), rgb(0, 0, 255))');
</script>
</body>
</html>
Modified: trunk/Source/WebCore/ChangeLog (276202 => 276203)
--- trunk/Source/WebCore/ChangeLog 2021-04-17 18:22:35 UTC (rev 276202)
+++ trunk/Source/WebCore/ChangeLog 2021-04-17 19:02:05 UTC (rev 276203)
@@ -1,3 +1,17 @@
+2021-04-17 Tim Nguyen <[email protected]>
+
+ Don't omit conic gradient starting angle when serializing when starting angle is under 0
+ https://bugs.webkit.org/show_bug.cgi?id=224719
+
+ Reviewed by Ryosuke Niwa.
+
+ Updated pre-existing test to cover this case.
+
+ Test: LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html
+
+ * css/CSSGradientValue.cpp:
+ (WebCore::CSSConicGradientValue::customCSSText const):
+
2021-04-17 Zalan Bujtas <[email protected]>
[Cleanup] Modernize TrailingObjects
Modified: trunk/Source/WebCore/css/CSSGradientValue.cpp (276202 => 276203)
--- trunk/Source/WebCore/css/CSSGradientValue.cpp 2021-04-17 18:22:35 UTC (rev 276202)
+++ trunk/Source/WebCore/css/CSSGradientValue.cpp 2021-04-17 19:02:05 UTC (rev 276203)
@@ -1226,7 +1226,7 @@
bool wroteSomething = false;
- if (m_angle && m_angle->computeDegrees() > 0) {
+ if (m_angle && m_angle->computeDegrees()) {
result.append("from ", m_angle->cssText());
wroteSomething = true;
}