Repository navigation
script: Align live range update steps with specification - #47425
Conversation
|
🔨 Triggering try run (#32481987158) for Linux (WPT) |
|
🤖 Opened new upstream WPT pull request (web-platform-tests/wpt#62112) with upstreamable changes. |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#62112) title and body. |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62112). |
|
Test results for linux-wpt from try job (#32481987158): Flaky unexpected result (37)
Stable unexpected results that are known to be intermittent (13)
|
|
✨ Try run (#32481987158) succeeded. |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62112). |
|
✍ Updated existing upstream WPT pull request (web-platform-tests/wpt#62112) title and body. |
mrobinson
left a comment
There was a problem hiding this comment.
@SimonSapin Thanks for the review! I think I've addressed all of your concerns.
This change reworks the live range update steps that show up in various places in the specification so that they match what the specification says. Now updates to live ranges uses the existing `set_start` and `set_end` APIs which simplify the code greatly as they already handle updating the `Node`'s live range list. This is preparation work for adding a new live-ish range type for selections (which will have a few different requirements than a real DOM live range). Improvements to spec compliance of `Node#normalize()`: - Instead of issuing one mutation record per merged node only issue a single one. - The change to the preserved node's data happens before the merged nodes' removal. - Indices for live range updates would be stale when merging more than two nodes. Notes on performance: - This switches to accessing a rooted `SmallVec` of live ranges per-node. In cases where a node has 4 or fewer live ranges, this will not allocate, otherwise this adds a new vector allocation for an edge case. - The amount of rooting should be unchanged as the old code had to root all accessed `Range`'s anyway. - In some cases we avoid calculating node indices where they were before using `LazyCell`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62112). |
|
📝 Transplanted new upstreamable changes to existing upstream WPT pull request (web-platform-tests/wpt#62112). |
This change reworks the live range update steps that show up in various places in the specification so that they match what the specification says. Now updates to live ranges use the existing `set_start` and `set_end` APIs which simplify the code greatly as they already handle updating the `Node`'s live range list. This is preparation work for adding a new live-ish range type for selections (which will have a few different requirements than a real DOM live range). Improvements to spec compliance of `Node#normalize()`: - Instead of issuing one mutation record per merged node only issue a single one. - The change to the preserved node's data happens before the merged nodes' removal. - Indices for live range updates would be stale when merging more than two nodes. Notes on performance: - This switches to accessing a rooted `SmallVec` of live ranges per-node. In cases where a node has 4 or fewer live ranges, this will not allocate, otherwise this adds a new vector allocation for an edge case. - The amount of rooting should be unchanged as the old code had to root all accessed `Range`'s anyway. - In some cases we avoid calculating node indices where they were before using `LazyCell`. Testing: This change adds a new WPT test. --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This change reworks the live range update steps that show up in various places in the specification so that they match what the specification says. Now updates to live ranges use the existing `set_start` and `set_end` APIs which simplify the code greatly as they already handle updating the `Node`'s live range list. This is preparation work for adding a new live-ish range type for selections (which will have a few different requirements than a real DOM live range). Improvements to spec compliance of `Node#normalize()`: - Instead of issuing one mutation record per merged node only issue a single one. - The change to the preserved node's data happens before the merged nodes' removal. - Indices for live range updates would be stale when merging more than two nodes. Notes on performance: - This switches to accessing a rooted `SmallVec` of live ranges per-node. In cases where a node has 4 or fewer live ranges, this will not allocate, otherwise this adds a new vector allocation for an edge case. - The amount of rooting should be unchanged as the old code had to root all accessed `Range`'s anyway. - In some cases we avoid calculating node indices where they were before using `LazyCell`. Testing: This change adds a new WPT test. --------- Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This change reworks the live range update steps that show up in various
places in the specification so that they match what the specification
says. Now updates to live ranges use the existing
set_startandset_endAPIs which simplify the code greatly as they already handleupdating the
Node's live range list. This is preparation work foradding a new live-ish range type for selections (which will have a few
different requirements than a real DOM live range).
Improvements to spec compliance of
Node#normalize():single one.
nodes' removal.
than two nodes.
Notes on performance:
SmallVecof live rangesper-node. In cases where a node has 4 or fewer live ranges, this will
not allocate, otherwise this adds a new vector allocation for an
edge case.
root all accessed
Range's anyway.before using
LazyCell.Testing: This change adds a new WPT test.