<?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>242775</bug_id>
          
          <creation_ts>2022-07-14 16:25:24 -0700</creation_ts>
          <short_desc>shorthand serialization for background and mask should not include &quot;initial&quot; in the middle of the value</short_desc>
          <delta_ts>2022-12-21 07:30:08 -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>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=244657</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>185953</blocked>
    
    <blocked>247769</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Cameron McCormack (:heycam)">heycam</reporter>
          <assigned_to name="Darin Adler">darin</assigned_to>
          <cc>darin</cc>
    
    <cc>karlcow</cc>
    
    <cc>ntim</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1883893</commentid>
    <comment_count>0</comment_count>
    <who name="Cameron McCormack (:heycam)">heycam</who>
    <bug_when>2022-07-14 16:25:24 -0700</bug_when>
    <thetext>For example:

&lt;!DOCTYPE html&gt;
&lt;style&gt;
div { background: none; background-position: initial; }
&lt;/style&gt;
&lt;pre id=log&gt;&lt;/pre&gt;
&lt;script&gt;
log.textContent = &quot;background: &quot; + document.styleSheets[0].cssRules[0].style.getPropertyValue(&quot;background&quot;);
&lt;/script&gt;

This outputs &quot;background: none initial initial&quot;, which is not valid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1885868</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-21 16:26:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/97405629&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1912394</commentid>
    <comment_count>2</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-11-14 12:11:18 -0800</bug_when>
    <thetext>There is a straightforward way to make sure we don’t serialize any shorthands when one of the longhands has a keyword like &quot;initial&quot;. I wrote the code for it and it’s super-simple.

But a prerequisite for doing that is that we have to stop setting longhands to &quot;initial&quot; as a side effect of *using* a shorthand. Otherwise, we’ll be getting the empty string way too often. That means we probably need to fix bug 244657 *before* fixing this one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1912415</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2022-11-14 13:32:12 -0800</bug_when>
    <thetext>Does removing `case CSSPropertyBackground:` from the `canUseShorthandForLonghand` blocklist in StyleProperties help?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1913888</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-11-21 10:35:13 -0800</bug_when>
    <thetext>It does not fix this problem, no, but it should be done for other reasons.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1915937</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2022-12-01 07:51:54 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/7025</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917006</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-12-06 12:55:13 -0800</bug_when>
    <thetext>Committed 257429@main (a0488d1bf07c): &lt;https://commits.webkit.org/257429@main&gt;

Reviewed commits have been landed. Closing PR #7025 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>