Bug 1672021 [wpt PR 26149] - Synchronize classList on SVGElement.className.baseVal...
commit73f0d41f4e8dd1ceb3c0c0dd875d9900a542e88a
authorFredrik Söderqvist <fs@opera.com>
Fri, 23 Oct 2020 22:01:22 +0000 (23 22:01 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 26 Oct 2020 12:05:54 +0000 (26 12:05 +0000)
tree5ed67fd58b5a86dcb4a606eaf58228f40582f7f3
parentf1164a692b5aaebaaea206a20151935ded0d5b37
Bug 1672021 [wpt PR 26149] - Synchronize classList on SVGElement.className.baseVal updates, a=testonly

Automatic update from web-platform-tests
Synchronize classList on SVGElement.className.baseVal updates

Element.classList is normally updated by AttributeChanged(). When the
underlying attribute is updated via the corresponding SVG animated
property AttributeChanged() is not invoked, which makes the list and
attribute go out of sync.

Refactor baseVal updates on SVGElement so that they go through a single
entry point by renaming SvgAttributeBaseValChanged() to
BaseValueChanged() and folding it into the other user
(SVGElement::AttributeChanged). Fold InvalidateSVGAttributes() into
BaseValueChanged() since it's the only caller.

BaseValueChanged() is then updated to update the classList when the
className base value is updated. Move the classList update into a shared
Element::UpdateClassList() function.

Fixed: 1137953
Change-Id: I64efff0bfd163b14eb937c635c3d170b4511f4a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480023
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818035}

--

wpt-commits: 51d4134420706b7765ce49ac9b7d0d1912263731
wpt-pr: 26149
testing/web-platform/tests/svg/types/scripted/SVGElement.className-01.svg [new file with mode: 0644]