Skip to content
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

this isit #1604

Merged
merged 17 commits into from
Feb 13, 2017
Merged

this isit #1604

merged 17 commits into from
Feb 13, 2017

Conversation

kares
Copy link
Contributor

@kares kares commented Feb 12, 2017

@flavorjones #1319 and #1320 at your service!

these are really the 'simplest' thing that works ...

jkraemer and others added 17 commits February 10, 2017 02:45
... now contains ~ same code as DTMManagerDefault
we can not override the class since the state we're into is private

we have to move it into the apache pkg due pkg-private constructor :
DOM2DTMdefaultNamespaceDeclarationNode
`RuntimeException: Could not resolve the node to a handle`
... not needed for Nokogiri but its not clear what else it might affect
resolves sparklemotion#1319 (test borrowed from @jkraemer)

adjusted test for sparklemotion#1320  to be a little more complex
@flavorjones
Copy link
Member

Wow! Thanks so much for submitting this. Looking at everything now ...

@@ -293,7 +293,11 @@ def == other
# Returns a new NodeSet containing all the children of all the nodes in
# the NodeSet
def children
inject(NodeSet.new(document)) { |set, node| set += node.children }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand why this change is being made. Is it for performance? If so, can you share your benchmarks?

I'm asking only because it seems out of place in this patchset.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't be necessary.
wanted to make sure only a single NodeSet is created (as I was debugging how the whole piece behaves with decorators), than I left it in as it seemed to make sense but I do not have benchmarks.

it "must" be faster :) but you're right this should have been 2 PRs I just 💅 as I went with the fixes.

on my defense - its uglier but similar to the def reverse code bellow 😉
I am also fine with moving it out ... if you prefer to have it separately?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, it's fine, I was just curious.

@flavorjones
Copy link
Member

flavorjones commented Feb 13, 2017

Other than the one question I asked above, this looks great.

@flavorjones
Copy link
Member

Tagging flavorjones/loofah#88 as that is definitely addressed by this patchset.

@flavorjones flavorjones merged commit 367a152 into sparklemotion:master Feb 13, 2017
@kares kares mentioned this pull request Jun 28, 2018
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.

3 participants