WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
274605
Remove 'presentational hints' from `width` attribute for `<hr>`
https://bugs.webkit.org/show_bug.cgi?id=274605
Summary
Remove 'presentational hints' from `width` attribute for `<hr>`
Ahmad Saleem
Reported
2024-05-23 11:25:43 PDT
Hi Team, While looking into WPT failures: (1) -
https://wpt.fyi/results/html/rendering/non-replaced-elements/the-hr-element-0/width.html?label=master&label=experimental&aligned&q=the-hr-element
(2) -
https://wpt.fyi/results/html/rendering/dimension-attributes.html?label=master&label=experimental&aligned&q=safari%3Afail%20%3Chr
^ In (2) - we are failing few e.g. <hr width="0%"> mapping to <hr> width property Web-Spec:
https://html.spec.whatwg.org/#the-hr-element-2
"The width attribute on an hr element maps to the dimension property 'width' on the element." These failure stems from not adhering to above spec here:
https://searchfox.org/wubkat/rev/aa28356f83b8a683976102106065dbd46f9a0299/Source/WebCore/html/HTMLHRElement.cpp#87
case AttributeNames::widthAttr: if (auto valueInteger = parseHTMLInteger(value); valueInteger && !*valueInteger) addPropertyToPresentationalHintStyle(style, CSSPropertyWidth, 0, CSSUnitType::CSS_PX); else addHTMLLengthToStyle(style, CSSPropertyWidth, value); break; if I change this to below by removing 'Presentational Hint' - we start passing above tests: case AttributeNames::widthAttr: addHTMLLengthToStyle(style, CSSPropertyWidth, value); break; __ Just raising so we can fix it. Thanks!
Attachments
Add attachment
proposed patch, testcase, etc.
EWS
Comment 1
2024-05-23 17:11:19 PDT
Committed
279245@main
(fe5976c30783): <
https://commits.webkit.org/279245@main
> Reviewed commits have been landed. Closing PR #29000 and removing active labels.
Radar WebKit Bug Importer
Comment 2
2024-05-23 17:12:29 PDT
<
rdar://problem/128647444
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug