
Move the Trusted Types check -- which can modify the DOM -- *before* the structure checks, to prevent inconsistencies from concurrent manipulation of the same attribute. This fixes a number of WPT subtests in trusted-types/modify-attributes-in-callback.html and trusted-types/set-attributes-mutations-in-callback.tentative.html Spec: https://github.com/whatwg/dom/pull/1268 Bug: 394760815, 330516530 Change-Id: I9a394a75348598cc68e5b073d8769c826cd0605a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6243963 Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org> Reviewed-by: Joey Arhar <jarhar@chromium.org> Cr-Commit-Position: refs/heads/main@{#1431595}