<?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>259620</bug_id>
          
          <creation_ts>2023-07-28 18:24:07 -0700</creation_ts>
          <short_desc>&apos;hr&apos; with width as 0 or 0px get 1px leading to WPT failure</short_desc>
          <delta_ts>2023-07-29 16:05:17 -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>DOM</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, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>akeerthi</cc>
    
    <cc>karlcow</cc>
    
    <cc>ntim</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1968721</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-07-28 18:24:07 -0700</bug_when>
    <thetext>Hi Team,

While trying to investigate our WPT failures in HTML/Rendering for &apos;dimension-attributes.html&apos;, I came across following:

Test Case: http://wpt.live/html/rendering/dimension-attributes.html

For following two cases:

1) &lt;hr width=&quot;0&quot;&gt; mapping to &lt;hr&gt; width property	
2) &lt;hr width=&quot;0px&quot;&gt; mapping to &lt;hr&gt; width property	

We get 1px due to following:

https://github.com/WebKit/WebKit/blob/088b5a6b92a887bbf29d18135987d5c2c6392d20/Source/WebCore/html/HTMLHRElement.cpp#L89

Where we are forcing 1px:

addPropertyToPresentationalHintStyle(style, CSSPropertyWidth, 1, CSSUnitType::CSS_PX);

Changing it to &apos;0&apos; leads to two progressions.

Only Firefox passes these tests and Chrome Canary 117 also fail them.

______

I just wanted to raise and get input whether it is good to go so I can do PR or there are other consequences of this change.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968732</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2023-07-28 23:08:05 -0700</bug_when>
    <thetext>&gt; Changing it to &apos;0&apos; leads to two progressions.

Seems fine, visually it doesn&apos;t seem to make a huge difference.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968780</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-07-29 16:04:29 -0700</bug_when>
    <thetext>Committed 266418@main (57717fd0d5ab): &lt;https://commits.webkit.org/266418@main&gt;

Reviewed commits have been landed. Closing PR #16216 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968781</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-07-29 16:05:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/113087533&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>