<?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>246914</bug_id>
          
          <creation_ts>2022-10-23 03:36:36 -0700</creation_ts>
          <short_desc>[web-animations] commitStyles() fails to commit a relative line-height value</short_desc>
          <delta_ts>2022-10-24 06:02:19 -0700</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>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>222096</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Antoine Quint">graouts</reporter>
          <assigned_to name="Antoine Quint">graouts</assigned_to>
          <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>koivisto</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1907627</commentid>
    <comment_count>0</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-10-23 03:36:36 -0700</bug_when>
    <thetext>We fail this subtest in web-animations/interfaces/Animation/commitStyles.html:

test(t =&gt; {
  const div = createDiv(t);
  div.style.fontSize = &apos;10px&apos;;

  const animation = div.animate(
    { lineHeight: &apos;1.5&apos; },
    { duration: 1, fill: &apos;forwards&apos; }
  );
  animation.finish();
  animation.commitStyles();
  animation.cancel();

  assert_numeric_style_equals(getComputedStyle(div).lineHeight, 15);
  assert_equals(div.style.lineHeight, &quot;1.5&quot;, &quot;line-height is committed as a relative value&quot;);

  div.style.fontSize = &apos;20px&apos;;
  assert_numeric_style_equals(getComputedStyle(div).lineHeight, 30,
      &quot;Changes to the font-size should affect the committed line-height&quot;);

}, &apos;Commits relative line-height&apos;);

This is because of BuilderConverter::convertLineHeight() where a line-height specified as a percentage is stored as a LengthType::Fixed, while a line-height specified as number is stored as LengthType::Percent.

We&apos;ll somehow need to account for `specifiedLineHeight()`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907637</commentid>
    <comment_count>1</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-10-23 04:13:09 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/5685</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907748</commentid>
    <comment_count>2</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-10-24 02:18:13 -0700</bug_when>
    <thetext>We&apos;ll need mix() support, I filed https://bugs.webkit.org/show_bug.cgi?id=246937. Retitling this bug to correctly identify the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907749</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2022-10-24 02:22:05 -0700</bug_when>
    <thetext>Wrong bug about mix(), we have a fix for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907776</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-10-24 06:01:27 -0700</bug_when>
    <thetext>Committed 255912@main (1610fc726837): &lt;https://commits.webkit.org/255912@main&gt;

Reviewed commits have been landed. Closing PR #5685 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1907777</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-10-24 06:02:19 -0700</bug_when>
    <thetext>&lt;rdar://problem/101497231&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>