<?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>266863</bug_id>
          
          <creation_ts>2023-12-24 03:56:28 -0800</creation_ts>
          <short_desc>Consider lowercasing CSS keywords at source</short_desc>
          <delta_ts>2025-01-22 08:56:05 -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>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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne van Kesteren">annevk</reporter>
          <assigned_to name="Sam Weinig">sam</assigned_to>
          <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>2001794</commentid>
    <comment_count>0</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-12-24 03:56:28 -0800</bug_when>
    <thetext>It would probably be best if CSS keywords were lowercased in CSSValueKeywords.in rather than requiring them to be lowercased upon serialization (e.g., that&apos;s how we did currentcolor).

This would allow for removing the lowercasing code introduced in bug 249438.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2001878</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-12-25 00:03:06 -0800</bug_when>
    <thetext>That&apos;s probably fine, but there should be an assert somewhere to ensure everything is lowercase.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2002333</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-12-31 03:57:12 -0800</bug_when>
    <thetext>&lt;rdar://problem/120323932&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088543</commentid>
    <comment_count>3</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2025-01-20 10:06:10 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/39295</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088570</commentid>
    <comment_count>4</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2025-01-20 14:15:25 -0800</bug_when>
    <thetext>Doing this makes the following tests fail:

imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-inline-value.html
imported/w3c/web-platform-tests/css/css-transforms/parsing/transform-valid.html
imported/w3c/web-platform-tests/css/css-transforms/transform-important.html
transforms/2d/transform-value-types.html

(see https://ews-build.s3-us-west-2.amazonaws.com/macOS-Ventura-Release-WK1-Tests-EWS/20cb8caf-31948/results.html).

We should figure out if we think there is a compatibility concern here before proceeding.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088574</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-01-20 15:24:11 -0800</bug_when>
    <thetext>Spec reference for 
translateX(), translateY(), scaleX(), scaleY(), skewX(), skewY()
https://drafts.csswg.org/css-transforms/#two-d-transform-functions</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088576</commentid>
    <comment_count>6</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-01-20 15:41:55 -0800</bug_when>
    <thetext>https://codepen.io/webcompat/pen/xbKaLav
uppercase and lowercase are working the same without issues.

So the compat risk would be really on the side of other tools and JavaScript libraries expecting a match on the casing of these names.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088579</commentid>
    <comment_count>7</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-01-20 16:00:00 -0800</bug_when>
    <thetext>if I manually change the test to be lowercase the error is about the canonical serialization.
assert_equals(&quot;translateX(-4px)&quot;, &quot;translatex(-4px)&quot;, &quot;serialization should be canonical&quot;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088607</commentid>
    <comment_count>8</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2025-01-20 18:03:30 -0800</bug_when>
    <thetext>Yes, the only compat issue is of course sites that depend on the specific serialization.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088608</commentid>
    <comment_count>9</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2025-01-20 18:04:34 -0800</bug_when>
    <thetext>The parser is agnostic to case for identifiers. This bug is only about serialization.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088655</commentid>
    <comment_count>10</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2025-01-21 02:12:00 -0800</bug_when>
    <thetext>I guess we should not do this unilaterally then. I was thinking in particular about the keywords bug 249438 was fixing, such as &apos;srgb&apos; and &apos;optimizespeed&apos;. Or do we also have cases where those need to be serialized as &apos;sRGB&apos; and &apos;optimizeSpeed&apos; and so there&apos;s no real canonical representation?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088711</commentid>
    <comment_count>11</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2025-01-21 09:17:35 -0800</bug_when>
    <thetext>I think the only cases we know of where this is an issue is the transform ones. 

I think it&apos;s quite unlikely to be a real compat issue, and updating the tests makes sense (the cases of sites relying on specific capitalization of serialization seems quite unlikely).

So, my proposal would be to just update the tests to match the spec, which is quite clear in saying identifiers should be serialized as all lowercase.

I am happy to make this fix if no one objects.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088741</commentid>
    <comment_count>12</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2025-01-21 11:10:58 -0800</bug_when>
    <thetext>I see, I didn&apos;t realize. That sounds fine to me. I&apos;ll ping Elika just in case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088917</commentid>
    <comment_count>13</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2025-01-22 00:03:42 -0800</bug_when>
    <thetext>Elika pointed out that this isn&apos;t really defined. I filed https://github.com/w3c/csswg-drafts/issues/11556</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2089006</commentid>
    <comment_count>14</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2025-01-22 08:56:05 -0800</bug_when>
    <thetext>Oh, interesting! Thanks for filing!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>