⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 276203 in webkit


Ignore:
Timestamp:
Apr 17, 2021, 12:02:05 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Don't omit conic gradient starting angle when serializing when starting angle is under 0
https://bugs.webkit.org/show_bug.cgi?id=224719

Patch by Tim Nguyen <ntim@apple.com> on 2021-04-17
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

LayoutTests/imported/w3c:

  • 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:

Source/WebCore:

  • css/CSSGradientValue.cpp:

(WebCore::CSSConicGradientValue::customCSSText const):

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r276182 r276203  
     12021-04-17  Tim Nguyen  <ntim@apple.com>
     2
     3        Don't omit conic gradient starting angle when serializing when starting angle is under 0
     4        https://bugs.webkit.org/show_bug.cgi?id=224719
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Updated pre-existing test to cover this case.
     9
     10        Test: LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html
     11
     12        * web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub-expected.txt:
     13        * web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html:
     14
    1152021-04-16  Cameron McCormack  <heycam@apple.com>
    216
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub-expected.txt

    r276002 r276203  
    3030FAIL 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)"
    3131FAIL 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)"
     32PASS Property background-image value 'conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))'
     33FAIL 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)"
     34FAIL 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)"
     35FAIL 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)"
    3236
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html

    r264522 r276203  
    5555test_computed_value('background-image', 'conic-gradient(from 45deg at 50%, red, blue)', 'conic-gradient(from 45deg, rgb(255, 0, 0), rgb(0, 0, 255))');
    5656test_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))');
     57test_computed_value('background-image', 'conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))');
     58test_computed_value('background-image', 'conic-gradient(from -45deg at center, red, blue)', 'conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))');
     59test_computed_value('background-image', 'conic-gradient(from -45deg at 50%, red, blue)', 'conic-gradient(from -45deg, rgb(255, 0, 0), rgb(0, 0, 255))');
     60test_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))');
    5761</script>
    5862</body>
  • trunk/Source/WebCore/ChangeLog

    r276202 r276203  
     12021-04-17  Tim Nguyen  <ntim@apple.com>
     2
     3        Don't omit conic gradient starting angle when serializing when starting angle is under 0
     4        https://bugs.webkit.org/show_bug.cgi?id=224719
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Updated pre-existing test to cover this case.
     9
     10        Test: LayoutTests/imported/w3c/web-platform-tests/css/css-backgrounds/parsing/background-image-computed.sub.html
     11
     12        * css/CSSGradientValue.cpp:
     13        (WebCore::CSSConicGradientValue::customCSSText const):
     14
    1152021-04-17  Zalan Bujtas  <zalan@apple.com>
    216
  • trunk/Source/WebCore/css/CSSGradientValue.cpp

    r276141 r276203  
    12271227    bool wroteSomething = false;
    12281228
    1229     if (m_angle && m_angle->computeDegrees() > 0) {
     1229    if (m_angle && m_angle->computeDegrees()) {
    12301230        result.append("from ", m_angle->cssText());
    12311231        wroteSomething = true;
Note: See TracChangeset for help on using the changeset viewer.