Skip to content

Remove reliance on inert nodecollection#37

Merged
gijsk merged 3 commits intomozilla:masterfrom
gijsk:remove-reliance-on-inert-nodecollection
Mar 20, 2015
Merged

Remove reliance on inert nodecollection#37
gijsk merged 3 commits intomozilla:masterfrom
gijsk:remove-reliance-on-inert-nodecollection

Conversation

@gijsk
Copy link
Contributor

@gijsk gijsk commented Mar 20, 2015

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.

@gijsk
Copy link
Contributor Author

gijsk commented Mar 20, 2015

(oh, and purely based on some totally unscientific tests in my console, it seems to be approximately 25% faster at running all our tests)

@gijsk
Copy link
Contributor Author

gijsk commented Mar 20, 2015

@leibovic, @n1k0 thoughts/reviews? :-)

@leibovic leibovic mentioned this pull request Mar 20, 2015
@leibovic
Copy link
Contributor

@thebnich, can you take a look at these JSDOMParser changes?

@leibovic
Copy link
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.
@leibovic
Copy link
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)
@gijsk gijsk force-pushed the remove-reliance-on-inert-nodecollection branch from 5719dd0 to 2b09db3 Compare March 20, 2015 01:29
@gijsk
Copy link
Contributor Author

gijsk commented Mar 20, 2015

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
@gijsk gijsk merged commit c2a733f into mozilla:master Mar 20, 2015
@gijsk gijsk deleted the remove-reliance-on-inert-nodecollection branch March 20, 2015 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants