Remove reliance on inert nodecollection#37
Merged
gijsk merged 3 commits intomozilla:masterfrom Mar 20, 2015
Merged
Conversation
…st, next, previous; Y from Child, Element)
Contributor
Author
|
(oh, and purely based on some totally unscientific tests in my console, it seems to be approximately 25% faster at running all our tests) |
Contributor
Author
Merged
Contributor
|
@thebnich, can you take a look at these JSDOMParser changes? |
Contributor
|
We discussed this in person, but for posterity: I think it's fine to merge this, since it's a strict improvement over what we currently have, and we can continue to hack on this tomorrow before merging things into fx-team. |
…ky DOMCollection, fix trims, fix a potential null access, etc.
Contributor
|
Aside: I wonder if it would be worth some simple unit tests for JSDOMParser. Maybe not, if we're going to move away from using this, but it could be nice to test the new node manipulation logic. |
…ests (using an env var because mocha doesn't support passing arguments)
5719dd0 to
2b09db3
Compare
Contributor
Author
|
Per IRL discussion, merging first, doing tests/checks later! |
gijsk
added a commit
that referenced
this pull request
Mar 20, 2015
…tion Remove reliance on inert nodecollection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This gets rid of the node collection stuff for the main loop, which should solve a lot of issues. The rest of the code (that uses getElementsByTagName) doesn't actually try to remove things from the array, so should be OK.
There are other things we can do now that the loop uses some more sane constructs and the DOM is more powerful, but I've held off on that for now.
This change in and of itself passes all our existing tests.