New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always update a DOMTokenList #444
Conversation
@ayg I think this fixes both your issues, assuming I write a suitable fix for the Infra Standard, which I'll work on. |
Thanks! |
That is now whatwg/infra#126. Review appreciated here and there. |
Oh, and since you were writing tests, I should maybe include a pointer to those in the commit message. |
I have a patch submitted in Gecko-land. I have comments marking where to change when the two issues I filed are resolved. If you want a link to the file, it's here (raw). |
I briefly reviewed both of the PRs, and at a glance they LGTM. |
To clarify, the test I'm submitting does not match the new spec and will have to be updated, which I'm happy to do. There's no point in updating the in-tree test because I'm rewriting it anyway and you're just going to make jgraham sad when he has to figure out how to merge it. |
@ayg will you update the tests? |
Tests submitted upstream. Note that I'm disappearing as of tonight, so it's possible they won't actually get accepted for a few months. If this happens and someone wants them before then, feel free to slurp them into wpt directly. (I'll try to remember to submit a wpt PR or at least ask someone to if this happens, but I'm posting it here too so people know in case I forget.) |
…hods r=masayuki Previously, replace() and toggle() would not always remove duplicates and whitespace from the DOM attribute in the case where they were no-ops (replacing a nonexistent token, force-toggling a token to its current state). Now they do. This matches the behavior of add() and remove(), and also replace() in one case (replacing an existing token with itself). This follows a spec change: whatwg/dom#444 MozReview-Commit-ID: 7lDEQxOGxPV --HG-- extra : rebase_source : 842ff24c46681649affcedcba2623128fc6f5a7b
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1360230 some changes here aren't web compatible. |
…hods r=masayuki Previously, replace() and toggle() would not always remove duplicates and whitespace from the DOM attribute in the case where they were no-ops (replacing a nonexistent token, force-toggling a token to its current state). Now they do. This matches the behavior of add() and remove(), and also replace() in one case (replacing an existing token with itself). This follows a spec change: whatwg/dom#444 MozReview-Commit-ID: 7lDEQxOGxPV
…hods r=masayuki Previously, replace() and toggle() would not always remove duplicates and whitespace from the DOM attribute in the case where they were no-ops (replacing a nonexistent token, force-toggling a token to its current state). Now they do. This matches the behavior of add() and remove(), and also replace() in one case (replacing an existing token with itself). This follows a spec change: whatwg/dom#444 MozReview-Commit-ID: 7lDEQxOGxPV UltraBlame original commit: 47b53e3d4b27c0b900c06180d857dac1de1d3241
…hods r=masayuki Previously, replace() and toggle() would not always remove duplicates and whitespace from the DOM attribute in the case where they were no-ops (replacing a nonexistent token, force-toggling a token to its current state). Now they do. This matches the behavior of add() and remove(), and also replace() in one case (replacing an existing token with itself). This follows a spec change: whatwg/dom#444 MozReview-Commit-ID: 7lDEQxOGxPV UltraBlame original commit: 47b53e3d4b27c0b900c06180d857dac1de1d3241
…hods r=masayuki Previously, replace() and toggle() would not always remove duplicates and whitespace from the DOM attribute in the case where they were no-ops (replacing a nonexistent token, force-toggling a token to its current state). Now they do. This matches the behavior of add() and remove(), and also replace() in one case (replacing an existing token with itself). This follows a spec change: whatwg/dom#444 MozReview-Commit-ID: 7lDEQxOGxPV UltraBlame original commit: 47b53e3d4b27c0b900c06180d857dac1de1d3241
In particular when invoking toggle() and replace(). Also rewrite it in
terms of the Infra Standard.
Fixes #442 and fixes #443.
Preview | Diff