Closed Bug 2079276 Opened 1 month ago Closed 1 month ago

[wpt-sync] Sync PR 63341 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=326462

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 63341 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/63341
Details from upstream follow.

Ahmad Saleem <ahmad.saleem792+github@gmail.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=326462

WebKit export from bug: element.dataset named getter matches non-data-* attributes and invalid property names

<pre>
element.dataset named getter matches non-data-* attributes and invalid property names

This patch aligns WebKit with Gecko / Firefox.

DatasetDOMStringMap's single-attribute fast path stripped the first five
characters of any attribute name without checking for the "data-" prefix,
so <div aria-label=x> exposed dataset.label === "x". The multi-attribute
path converted the property name to an attribute name without validating
it, so dataset["foo-bar"] matched data-foo-bar.

Check isValidAttributeName() in the fast path and isValidPropertyName()
in the multi-attribute path, in both item() and isSupportedPropertyName().

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=326462">https://bugs.webkit.org/show_bug.cgi?id=326462</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/322936@main">https://commits.webkit.org/322936@main</a>
</pre>

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 28 subtests

Status Summary

Firefox

OK : 1
PASS: 28

Chrome

OK : 1
PASS: 24
FAIL: 4

Safari

OK : 1
PASS: 14
FAIL: 14

Links

GitHub PR Head
GitHub PR Base

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
You need to log in before you can comment on or make changes to this bug.