Bug 172801
Summary: | Replace hardcoded <hr> rendering rules with 'overflow: hidden' UA style | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Pieters (:zcorpan) <zcorpan> |
Component: | Layout and Rendering | Assignee: | Karl Dubost <karlcow> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ahmad.saleem792, bfulgham, cdumez, karlcow, koivisto, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | FromImplementor, InRadar |
Version: | Safari Technology Preview | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=245156 |
Simon Pieters (:zcorpan)
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 <hr> should be removed in favor of having 'overflow: hidden' 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 "rgb(128, 128, 128)" but got "rgb(0, 0, 0)"
overflow FAIL assert_equals: expected "hidden" but got "visible"
/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 "isolate" but got "normal"
(The failure for 'color' is discussed in https://github.com/whatwg/html/issues/2727 and can be ignored for this issue.)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
Commit - https://chromium.googlesource.com/chromium/src.git/+/a2c5540dd92ca78780a8836b8325bd34440c318f
Ahmad Saleem
*** Bug 245174 has been marked as a duplicate of this bug. ***
Radar WebKit Bug Importer
<rdar://problem/100420364>
Karl Dubost
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.
Karl Dubost
Pull request: https://github.com/WebKit/WebKit/pull/4724
EWS
Committed 257446@main (619bc6e35423): <https://commits.webkit.org/257446@main>
Reviewed commits have been landed. Closing PR #4724 and removing active labels.