Bug
1871195 [wpt PR 43765] - Disallow invalid node types in DOM Parts API constructors, a=testonly
Automatic update from web-platform-tests
Disallow invalid node types in DOM Parts API constructors
It was previously possible to construct, e.g., a ChildNodePart with
previousSibling and nextSibling being the DOCTYPE element and the
documentElement. That causes problems when trying to clone that part,
because the CloneParts code tries to cast the ChildNodePart to a
DocumentPart, which it isn't.
This CL also adds more testing for this set of cases, and sets a few
more of the `DCHECK`s to `CHECK`s. This might be a performance hit on
the perf tests, but I think it's worth it.
Fixed:
1510578
Change-Id: Ie18901857a4b089265185c3efdabfb5448da2e46
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
5142457
Commit-Queue: Dan Clark <daniec@microsoft.com>
Auto-Submit: Mason Freed <masonf@chromium.org>
Reviewed-by: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#
1240329}
--
wpt-commits:
c3818b1575fe844e2e70307e91165bf9e78c963b
wpt-pr: 43765