[wpt-sync] Sync PR 35996 - Fix :has() invalidation bug on wiping an element by means of innerHTML
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox107 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 35996 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/35996
Details from upstream follow.
Byungwoo Lee <blee@igalia.com> wrote:
Fix :has() invalidation bug on wiping an element by means of innerHTML
There is a bug on :has() invalidation when removing both element and
non-element nodes by assigning new text to element.innerHTML because
ChildrenChangeType::kAllChildrenRemoved is not handled in
Element::ChildChanged().\<style>
div:has(span) { color: red }
\</style>
\<div id="target"> This is a text \<span> with span \</span>\</div>
\<script>
target.innerHTML = "This is a text";
\</script>Fixed the bug by handling the ChildrenChangeType::kAllChildrenRemoved
in Element::ChildChanged().Bug: 1366369
Change-Id: Ibe450fcd37005dd892c4939188aa39428a8565c3
Reviewed-on: https://chromium-review.googlesource.com/3910212
WPT-Export-Revision: 984b2950769aa1b0606bf077c4953f0469c49766
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 1•3 years ago
|
||
| Assignee | ||
Comment 2•3 years ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 5 subtests
Status Summary
Firefox
OK : 1
PASS: 3
FAIL: 2
Chrome
OK : 1
PASS: 3
FAIL: 2
Safari
OK : 1
PASS: 5
Links
Details
Firefox-only Failures
- /css/selectors/invalidation/has-invalidation-for-wiping-an-element.html [wpt.fyi]
- color after inserting text and div > .descendant: div#subject.color:
FAIL - color after inserting text and #child > .descendant: div#subject.color:
FAIL
- color after inserting text and div > .descendant: div#subject.color:
New Tests That Don't Pass
- /css/selectors/invalidation/has-invalidation-for-wiping-an-element.html [wpt.fyi]
- color after inserting text and div > .descendant: div#subject.color:
FAIL(Chrome:PASS, Safari:PASS) - color after inserting text and #child > .descendant: div#subject.color:
FAIL(Chrome:PASS, Safari:PASS)
- color after inserting text and div > .descendant: div#subject.color:
Comment 4•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/0335251f50a1
https://hg.mozilla.org/mozilla-central/rev/e8f88c2c1154
Description
•