<?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>205733</bug_id>
          
          <creation_ts>2020-01-03 10:24:31 -0800</creation_ts>
          <short_desc>Unitless zero should not always be allowed</short_desc>
          <delta_ts>2023-05-28 09:37:38 -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>CSS</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=207439</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>dino</cc>
    
    <cc>emilio</cc>
    
    <cc>graouts</cc>
    
    <cc>koivisto</cc>
    
    <cc>rniwa</cc>
    
    <cc>sam</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1602503</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2020-01-03 10:24:31 -0800</bug_when>
    <thetext>inline bool shouldAcceptUnitlessValue(double value, CSSParserMode cssParserMode, UnitlessQuirk unitless)
{
    // FIXME: Presentational HTML attributes shouldn&apos;t use the CSS parser for lengths
    return value == 0
        || isUnitLessValueParsingEnabledForMode(cssParserMode)
        || (cssParserMode == HTMLQuirksMode &amp;&amp; unitless == UnitlessQuirk::Allow);
}

Note the &quot;value == 0&quot;. This is wrong; unitless zero should only be accepted in some legacy situations. See https://www.w3.org/TR/css3-values/#angles and related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889511</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-07 05:52:30 -0700</bug_when>
    <thetext>This FIXME is present but the code is bit changed.

https://github.com/WebKit/WebKit/blob/10224b907dbca4a066401003bd0734bdefbadf1c/Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp#L93

Is this still required? Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958529</commentid>
    <comment_count>2</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-05-28 09:37:38 -0700</bug_when>
    <thetext>Comment 0 is addressed due to:

    (value == 0 &amp;&amp; unitlessZero == UnitlessZeroQuirk::Allow)

I.e., comparison to 0 is no longer done unconditionally.

The FIXME is a separate issue and sounds like it relates to callers of this method. Best tackled separately.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>