<?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>172801</bug_id>
          
          <creation_ts>2017-06-01 04:17:58 -0700</creation_ts>
          <short_desc>Replace hardcoded &lt;hr&gt; rendering rules with &apos;overflow: hidden&apos; UA style</short_desc>
          <delta_ts>2022-12-27 18:12:04 -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>Layout and Rendering</component>
          <version>Safari Technology Preview</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=245156</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>FromImplementor, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters (:zcorpan)">zcorpan</reporter>
          <assigned_to name="Karl Dubost">karlcow</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>cdumez</cc>
    
    <cc>karlcow</cc>
    
    <cc>koivisto</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1314570</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters (:zcorpan)">zcorpan</who>
    <bug_when>2017-06-01 04:17:58 -0700</bug_when>
    <thetext>https://github.com/whatwg/html/issues/2715
https://github.com/whatwg/html/pull/2724
https://github.com/w3c/web-platform-tests/pull/6115

The hardcoded rendering rules for &lt;hr&gt; should be removed in favor of having &apos;overflow: hidden&apos; in the UA stylesheet, which matches EdgeHTML. See https://github.com/whatwg/html/issues/2715#issuecomment-304881067 for rationale.

Failing tests in Safari 10.0 per https://github.com/w3c/web-platform-tests/pull/6115#issuecomment-305211101 :

/html/rendering/non-replaced-elements/the-hr-element-0/hr.html
color	FAIL	assert_equals: expected &quot;rgb(128, 128, 128)&quot; but got &quot;rgb(0, 0, 0)&quot;
overflow	FAIL	assert_equals: expected &quot;hidden&quot; but got &quot;visible&quot;

/html/rendering/non-replaced-elements/the-hr-element-0/setting-overflow-visible.html
control	FAIL	assert_equals: hr.clientHeight expected 50 but got 0
overflow: visible	FAIL	assert_equals: hr.offsetLeft expected 0 but got 50

In Safari TP this test also fails in addition to the above:

/html/rendering/non-replaced-elements/the-hr-element-0/hr.html
Fail	unicodeBidi	assert_equals: expected &quot;isolate&quot; but got &quot;normal&quot;


(The failure for &apos;color&apos; is discussed in https://github.com/whatwg/html/issues/2727 and can be ignored for this issue.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901004</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-25 06:48:29 -0700</bug_when>
    <thetext>Commit - https://chromium.googlesource.com/chromium/src.git/+/a2c5540dd92ca78780a8836b8325bd34440c318f</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901006</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-25 06:49:14 -0700</bug_when>
    <thetext>*** Bug 245174 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901226</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-09-26 11:26:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/100420364&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901308</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-09-26 15:10:45 -0700</bug_when>
    <thetext>The line to modify

https://searchfox.org/wubkat/rev/cf0cfbaf1ad7728a145c06e3539170870bbb913f/Source/WebCore/rendering/RenderBox.cpp#4951-4954

To remove isLegend()

bool RenderBox::avoidsFloats() const
{
    return isReplacedOrInlineBlock() || isHR() || isLegend() || isFieldset() || createsNewFormattingContext();
}

Then 
https://searchfox.org/wubkat/rev/cf0cfbaf1ad7728a145c06e3539170870bbb913f/Source/WebCore/css/html.css#101-109

Add to hr

overflow: hidden;
unicode-bidi: isolate;


Then a lot of refactoring of tests probably.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1901317</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2022-09-26 15:25:28 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/4724</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917073</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-12-06 16:40:06 -0800</bug_when>
    <thetext>Committed 257446@main (619bc6e35423): &lt;https://commits.webkit.org/257446@main&gt;

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

    </bug>

</bugzilla>