Bug 259620
| Summary: | 'hr' with width as 0 or 0px get 1px leading to WPT failure | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | akeerthi, karlcow, ntim, rniwa, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar, WPTImpact |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
While trying to investigate our WPT failures in HTML/Rendering for 'dimension-attributes.html', I came across following:
Test Case: http://wpt.live/html/rendering/dimension-attributes.html
For following two cases:
1) <hr width="0"> mapping to <hr> width property
2) <hr width="0px"> mapping to <hr> 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 '0' 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!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Tim Nguyen (:ntim)
> Changing it to '0' leads to two progressions.
Seems fine, visually it doesn't seem to make a huge difference.
EWS
Committed 266418@main (57717fd0d5ab): <https://commits.webkit.org/266418@main>
Reviewed commits have been landed. Closing PR #16216 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/113087533>