Bug
1697714 [wpt PR 27950] - Custom State Pseudo Class: Fix iterators of internals.states, a=testonly
Automatic update from web-platform-tests
Custom State Pseudo Class: Fix iterators of internals.states
internals.states.values() produced broken results if an item was
removed from internals.states after the iterator creation. Our
implementations used a collection class which did not support
modification while iteration.
This CL fixes it by updating the collection class from
LinkedHashSet<String> to Vector<String>. This makes operations of
internals.states O(N). However we expect people don't add huge
number of states to a single internals.states.
* Move the CustomStateIterationSource definition to the top of
custom_state_set.cc so that CustomStateSet::deleteForBinding()
recognizes methods of CustomStateIterationSource.
* CustomStateSet holds a set of CustomStateIterationSource because
CustomStateSet should tell item deletion to
CustomStateIterationSource instances.
Bug:
1184020
Change-Id: I20cd677b9ca3a10377daed1c0b51324b42b4771a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
2744921
Auto-Submit: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Mason Freed <masonfreed@chromium.org>
Cr-Commit-Position: refs/heads/master@{#861855}
--
wpt-commits:
cb34a01e7c225b9368130878da69e4f4855d90d7
wpt-pr: 27950