Bug 257172
| Summary: | HTMLOptionElement text setter should not throw | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | akeerthi, annevk, cdumez, karlcow, rniwa, webkit-bug-importer, wenson_hsieh |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, WPTImpact |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
This is another WPT Test case progression:
WPT Test Case - https://wpt.fyi/results/html/semantics/forms/the-option-element/option-text-setter.html?label=master&label=experimental&aligned&q=forms
WPT Test Case Link - http://wpt.live/html/semantics/forms/the-option-element/option-text-setter.html
Blink Commit - https://chromium-review.googlesource.com/c/chromium/src/+/721610
WebKit Source (only need to changes in HTMLOptionElement.cpp):
Delete from L126 to L133 - https://github.com/WebKit/WebKit/blob/21a4b1c5559f6ddda3f3c4166e5ab33cab2c475d/Source/WebCore/html/HTMLOptionElement.cpp#L126
and then add this line:
setTextContent(WTFMove(text));
______
This will fix another failing WPT test case and matching Chromium and Web-Spec:
Web-Spec: https://html.spec.whatwg.org/#dom-option-text
"The text attribute's setter must string replace all with the given value within this element.."
Chrome / Blink mention this spec line:
"On setting, the text attribute must act as if the textContent IDL
attribute on the element had been set to the new value"
Which I was not able to find.
____
Just wanted to raise.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
EWS
Committed 264442@main (8b8e722170c2): <https://commits.webkit.org/264442@main>
Reviewed commits have been landed. Closing PR #14238 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/109740566>