Closed Bug 1842680 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 40956 - "Correct" the class hierarchy for DOM Parts

Categories

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

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Mason Freed <masonf@chromium.org> wrote:

"Correct" the class hierarchy for DOM Parts

The prior hierarchy was a bit wonky:

         PartRoot (getParts, clone)
          /    \

DocumentPartRoot Part (root, metadata)
/
NodePart (node) ChildNodePart (prev/next/etc)

This was funny because a Part was a PartRoot, but kind of not always,
since a NodePart isn't really a PartRoot. That hierarchy was used
to avoid the inconvenience that multiple inheritance isn't a thing
for JS. This CL updates the class hierarchy to implement PartRoot as
a JS interface mixin, with the C++ implementation in a single PartRoot
base class shared by DocumentPartRoot and ChildNodePart. So the new
C++ class hierarchy looks like this:

       Part         PartRoot
      /    \        /      \

NodePart ChildNodePart DocumentPartRoot

This should make future additions (such as the ability to clone
ChildNodeParts) less painful.

Bug: 1453291
Change-Id: I1c3e820fc6d76aa56dcf3a2e0f26cfc6ab30f3e2
Reviewed-on: https://chromium-review.googlesource.com/4673702
WPT-Export-Revision: c1b9a852e0f53183f181dc7709922764c42930b7

PR 40956 applied with additional changes from upstream: c11f3d0e5c8f13ecee6e0a458fa997e1e46896a4, b9f2c32836b082ab21338b1ae0ad9f64648782be
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 9 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
FAIL: 5

Chrome

OK : 1
PASS: 1
FAIL: 4

Safari

OK : 1
FAIL: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /dom/parts/basic-dom-part-objects.tentative.html [wpt.fyi]
    • Basic imperative DOM Parts object construction (Document): FAIL (Chrome: FAIL, Safari: FAIL)
    • Cloning (Document): FAIL (Chrome: FAIL, Safari: FAIL)
    • Basic imperative DOM Parts object construction (DocumentFragment): FAIL (Chrome: FAIL, Safari: FAIL)
    • Cloning (DocumentFragment): FAIL (Chrome: FAIL, Safari: FAIL)
    • DOM mutation support: FAIL (Chrome: PASS, Safari: FAIL)
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b24778628b37
[wpt PR 40956] - "Correct" the class hierarchy for DOM Parts, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.