Closed Bug 1698749 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 28034 - HighlightAPI: Implement iteration for Highlight and HighlightRegistry.

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Fernando Fiori <ffiori@microsoft.com>' wrote:

HighlightAPI: Implement iteration for Highlight and HighlightRegistry.

Implemented by copying the elements in these setlike types into another data structure (a variant of Vector) at the beginning of the iteration, and then iterating through these copies instead of the live data structures.
There are currently similar approaches for setlike/maplike iterations in for example AudioParamMap and FontFaceSet. See bug 1185385 for more info.

Bug: 1185385
Change-Id: I7e2e36d63e80cca6623c8c67ad22db0079965568
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2748417
Reviewed-by: Ian Kilpatrick \<ikilpatrick@chromium.org>
Reviewed-by: Sanket Joshi \<sajos@microsoft.com>
Commit-Queue: Fernando Fiori \<ffiori@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#862577}

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

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

Total 4 tests

Status Summary

Firefox

OK : 2
FAIL : 31
ERROR: 2

Chrome

OK : 2
FAIL : 31
ERROR: 2

Safari

OK : 2
FAIL : 31
ERROR: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-highlight-api/Highlight-iteration-with-modifications.html
Highlight iteration is not modified when a new range is added after starting the iteration: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight iteration is not modified when a new range is added after starting the iteration with one range in the Highlight: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight iteration is not modified when the range that was pointed to by the iterator was deleted after starting the iteration: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight iteration is not modified when the range that was immediately after the one pointed to by the iterator was deleted after starting the iteration: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight iteration is not modified when a range that was already visited is deleted and there are still ranges to visit: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight iteration is not modified when the range that was pointed to by the iterator was deleted using .clear() after starting the iteration: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-highlight-api/Highlight-iteration.html
Highlight can be iterated when it's empty initializing the iterator with customHighlightSymbol.iterator: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated when it's empty initializing the iterator with customHighlight.values(): FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated when it's empty initializing the iterator with customHighlight.keys(): FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlightSymbol.iterator and adding a range by passing it to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlightSymbol.iterator and adding two ranges by passing them to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlight.values() and adding a range by passing it to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlight.values() and adding two ranges by passing them to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlight.keys() and adding a range by passing it to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlight.keys() and adding two ranges by passing them to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlightSymbol.iterator and adding a range by passing it to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlightSymbol.iterator and adding two ranges by passing them to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlight.values() and adding a range by passing it to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlight.values() and adding two ranges by passing them to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlight.keys() and adding a range by passing it to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with customHighlight.keys() and adding two ranges by passing them to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated when it's empty initializing the iterator with .entries(): FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with .entries() and adding a range by passing it to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with .entries() and adding two ranges by passing them to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with .entries() and adding a range by passing it to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated over all of its ranges initializing the iterator with .entries() and adding two ranges by passing them to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated through when it's empty using forEach.: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated through using forEach when it has one range that was added by passing it to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated through using forEach when it has two ranges that were added by passing them to the constructor: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated through using forEach when it has one range that was added by passing it to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
Highlight can be iterated through using forEach when it has two ranges that were added by passing them to the add function: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-highlight-api/HighlightRegistry-iteration-with-modifications.html: ERROR (Chrome: ERROR, Safari: ERROR)
/css/css-highlight-api/HighlightRegistry-iteration.html: ERROR (Chrome: ERROR, Safari: ERROR)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25ab2a4c857d
[wpt PR 28034] - HighlightAPI: Implement iteration for Highlight and HighlightRegistry., a=testonly
https://hg.mozilla.org/integration/autoland/rev/2836c4526262
[wpt PR 28034] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.