From 73f0d41f4e8dd1ceb3c0c0dd875d9900a542e88a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fredrik=20S=C3=B6derqvist?= Date: Fri, 23 Oct 2020 22:01:22 +0000 Subject: [PATCH] Bug 1672021 [wpt PR 26149] - Synchronize classList on SVGElement.className.baseVal updates, a=testonly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Stephen Chenney Cr-Commit-Position: refs/heads/master@{#818035} -- wpt-commits: 51d4134420706b7765ce49ac9b7d0d1912263731 wpt-pr: 26149 --- .../tests/svg/types/scripted/SVGElement.className-01.svg | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 testing/web-platform/tests/svg/types/scripted/SVGElement.className-01.svg diff --git a/testing/web-platform/tests/svg/types/scripted/SVGElement.className-01.svg b/testing/web-platform/tests/svg/types/scripted/SVGElement.className-01.svg new file mode 100644 index 000000000000..38121356a668 --- /dev/null +++ b/testing/web-platform/tests/svg/types/scripted/SVGElement.className-01.svg @@ -0,0 +1,15 @@ + + SVGElement.prototype.className: Reflects to .classList + + + + + -- 2.11.4.GIT