<?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>235792</bug_id>
          
          <creation_ts>2022-01-28 07:37:06 -0800</creation_ts>
          <short_desc>css/css-fonts/animations/font-variation-settings-interpolation.html has failures</short_desc>
          <delta_ts>2026-01-12 09:01:21 -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>Animations</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>232087</blocked>
    
    <blocked>246579</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Antoine Quint">graouts</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>darin</cc>
    
    <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>nmouchtaris</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1834945</commentid>
    <comment_count>0</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-01-28 07:37:06 -0800</bug_when>
    <thetext>css/css-fonts/animations/font-variation-settings-interpolation.html has 4 failures, we need to investigate and fix them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1837395</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-02-04 07:40:49 -0800</bug_when>
    <thetext>&lt;rdar://problem/88488519&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907555</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-10-22 10:39:38 -0700</bug_when>
    <thetext>I believe the failure has something to do with cubic bezier timing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907626</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-10-23 03:20:08 -0700</bug_when>
    <thetext>Our failures are:

FAIL CSS Transitions: property &lt;font-variation-settings&gt; from [&apos;aaaa&apos; 30, &apos;bbbb&apos; 20] to [&apos;aaaa&apos; 20, &apos;bbbb&apos; 30] at (3.40282e+38) should be [&apos;aaaa&apos; -3.40282e+38, &apos;bbbb&apos; 3.40282e+38] assert_array_equals: expected property 0 to be &quot;\&quot;aaaa\&quot; -3.40282e+38&quot; but got &quot;\&quot;aaaa\&quot; -Infinity&quot; (expected array [&quot;\&quot;aaaa\&quot; -3.40282e+38&quot;, &quot;\&quot;bbbb\&quot; 3.40282e+38&quot;] got [&quot;\&quot;aaaa\&quot; -Infinity&quot;, &quot;\&quot;bbbb\&quot; Infinity&quot;])
FAIL CSS Transitions with transition: all: property &lt;font-variation-settings&gt; from [&apos;aaaa&apos; 30, &apos;bbbb&apos; 20] to [&apos;aaaa&apos; 20, &apos;bbbb&apos; 30] at (3.40282e+38) should be [&apos;aaaa&apos; -3.40282e+38, &apos;bbbb&apos; 3.40282e+38] assert_array_equals: expected property 0 to be &quot;\&quot;aaaa\&quot; -3.40282e+38&quot; but got &quot;\&quot;aaaa\&quot; -Infinity&quot; (expected array [&quot;\&quot;aaaa\&quot; -3.40282e+38&quot;, &quot;\&quot;bbbb\&quot; 3.40282e+38&quot;] got [&quot;\&quot;aaaa\&quot; -Infinity&quot;, &quot;\&quot;bbbb\&quot; Infinity&quot;])
FAIL CSS Animations: property &lt;font-variation-settings&gt; from [&apos;aaaa&apos; 30, &apos;bbbb&apos; 20] to [&apos;aaaa&apos; 20, &apos;bbbb&apos; 30] at (3.40282e+38) should be [&apos;aaaa&apos; -3.40282e+38, &apos;bbbb&apos; 3.40282e+38] assert_array_equals: expected property 0 to be &quot;\&quot;aaaa\&quot; -3.40282e+38&quot; but got &quot;\&quot;aaaa\&quot; -Infinity&quot; (expected array [&quot;\&quot;aaaa\&quot; -3.40282e+38&quot;, &quot;\&quot;bbbb\&quot; 3.40282e+38&quot;] got [&quot;\&quot;aaaa\&quot; -Infinity&quot;, &quot;\&quot;bbbb\&quot; Infinity&quot;])
FAIL Web Animations: property &lt;font-variation-settings&gt; from [&apos;aaaa&apos; 30, &apos;bbbb&apos; 20] to [&apos;aaaa&apos; 20, &apos;bbbb&apos; 30] at (3.40282e+38) should be [&apos;aaaa&apos; -3.40282e+38, &apos;bbbb&apos; 3.40282e+38] assert_array_equals: expected property 0 to be &quot;\&quot;aaaa\&quot; -3.40282e+38&quot; but got &quot;\&quot;aaaa\&quot; -Infinity&quot; (expected array [&quot;\&quot;aaaa\&quot; -3.40282e+38&quot;, &quot;\&quot;bbbb\&quot; 3.40282e+38&quot;] got [&quot;\&quot;aaaa\&quot; -Infinity&quot;, &quot;\&quot;bbbb\&quot; Infinity&quot;])

It looks like a serialization problem to me where we use &quot;Infinity&quot; here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907640</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-10-23 04:35:14 -0700</bug_when>
    <thetext>The large number ends up getting rounded to Infinity at some point during the animation process. I think it has to do with conversion between double and float, but I can’t pinpoint exactly where it happens.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907642</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-10-23 04:39:00 -0700</bug_when>
    <thetext>By the time the serialization happens, the value is a floating point infinity, so it does not seem to be a bug in the serialization code itself, but rather in the animation code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907661</commentid>
    <comment_count>6</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-10-23 09:16:17 -0700</bug_when>
    <thetext>The issue is that we&apos;re animating font-variation-settings values which are floats and using a very large progress value for blending that itself is represented as a double. The blending happens in this method:

static inline float blendFunc(float from, float to, const CSSPropertyBlendingContext&amp; context)
{
    if (context.compositeOperation == CompositeOperation::Replace)
        return narrowPrecisionToFloat(from + (to - from) * context.progress);
    return narrowPrecisionToFloat(from + from + (to - from) * context.progress);
}

If we returned a double here, we would retain the precision, but narrowPrecisionToFloat() leads to the Infinity value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1914486</commentid>
    <comment_count>7</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-11-24 07:46:10 -0800</bug_when>
    <thetext>(In reply to Antoine Quint from comment #6)
&gt; The issue is that we&apos;re animating font-variation-settings values which are
&gt; floats and using a very large progress value for blending that itself is
&gt; represented as a double. The blending happens in this method:
&gt; 
&gt; static inline float blendFunc(float from, float to, const
&gt; CSSPropertyBlendingContext&amp; context)
&gt; {
&gt;     if (context.compositeOperation == CompositeOperation::Replace)
&gt;         return narrowPrecisionToFloat(from + (to - from) * context.progress);
&gt;     return narrowPrecisionToFloat(from + from + (to - from) *
&gt; context.progress);
&gt; }
&gt; 
&gt; If we returned a double here, we would retain the precision, but
&gt; narrowPrecisionToFloat() leads to the Infinity value.

In the past, I tried to clamp narrowPrecisionToFloat in bug 245356 and it changed this test from infinity to value.

PR - https://github.com/WebKit/WebKit/pull/4580</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1914492</commentid>
    <comment_count>8</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-11-24 08:02:12 -0800</bug_when>
    <thetext>Also Blink templatize the blend function in following crbug.com/276109 by fixing underflow issues in current code.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>