<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>196389</bug_id>
          
          <creation_ts>2019-03-28 20:39:58 -0700</creation_ts>
          <short_desc>[css-values-3] Computed value of calc() expression in linear-gradient function incorrect</short_desc>
          <delta_ts>2024-11-05 14:50:27 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>http://www.gtalbot.org/BrowserBugsSection/CSS3Values/trac-webkit-linear-gradient-calc.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>52378</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gérard Talbot (no longer involved)">browserbugs2</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>emilio</cc>
    
    <cc>karlcow</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1522354</commentid>
    <comment_count>0</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2019-03-28 20:39:58 -0700</bug_when>
    <thetext>Test
****

http://www.gtalbot.org/BrowserBugsSection/CSS3Values/trac-webkit-linear-gradient-calc.html



Expected result: 
linear-gradient(90deg, rgb(255, 255, 0), rgb(0, 0, 255) 50%)



Actual result in Epiphany 3.31.90-8061c1929 (WebKitGTK 2.24.0):
linear-gradient(calc(90deg), rgb(255, 255, 0), rgb(0, 0, 255) calc(50%))

- - - - - 

Firefox 68.0a1 buildID=20190327175114 achieves expected result.

- - - - - 

The original test is

https://trac.webkit.org/browser/webkit/trunk/LayoutTests/css3/calc/webkit-gradient-calc.html

and is using 
-webkit-gradient(linear,...) 
which is not standard.
linear-gradient() is standard.

- - - - - 

Correspondent Blink Issue:
https://bugs.chromium.org/p/chromium/issues/detail?id=947377

- - - - - 

I searched for duplicate and did not find any; I do not know if bug 52378 is still active.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879585</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-30 16:43:54 -0700</bug_when>
    <thetext>&lt;rdar://problem/96254863&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945913</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-03-31 22:38:50 -0700</bug_when>
    <thetext>Chrome Canary 114 and Safari 16.4 &amp; STP166 are failing this test.

Test Link - http://www.gtalbot.org/BrowserBugsSection/CSS3Values/trac-webkit-linear-gradient-calc.html

Firefox Nightly 113 is only browser passing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1967384</commentid>
    <comment_count>3</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2023-07-19 12:02:14 -0700</bug_when>
    <thetext>Additional (more complete) test on computed value of &apos;background-image: [ linear | radial | conic ]-gradient()&apos; with calc() function:
http://wpt.live/css/css-values/calc-linear-radial-conic-gradient-001.html

Test result:
https://wpt.fyi/results/css/css-values/calc-linear-radial-conic-gradient-001.html?label=experimental&amp;label=master&amp;aligned</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973190</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2023-08-23 22:40:44 -0700</bug_when>
    <thetext>This has impact on a number of tests.
Example: http://wpt.live/css/css-backgrounds/parsing/background-image-computed.sub.html

Each time a calc is not being resolved to the hard values and kept as calc.

expected: &quot;radial-gradient(0px at -30px -70px, rgb(255, 0, 0), rgb(0, 0, 255))&quot; 
actual:   &quot;radial-gradient(calc(-0.5em + 10px) at calc(-1em + 10px) calc(-2em + 10px), rgb(255, 0, 0), rgb(0, 0, 255))&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2070803</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-10-27 05:05:51 -0700</bug_when>
    <thetext>It seems all tests are passing on WebKit ToT (285740@main), do we need to do anything here.

&gt; http://www.gtalbot.org/BrowserBugsSection/CSS3Values/trac-webkit-linear-gradient-calc.html
&gt; http://wpt.live/css/css-values/calc-linear-radial-conic-gradient-001.html
&gt; http://wpt.live/css/css-backgrounds/parsing/background-image-computed.sub.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2072964</commentid>
    <comment_count>6</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2024-11-05 14:50:27 -0800</bug_when>
    <thetext>We can close probably.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>