Did you performance test to see if element.contains() is
faster than the old impl code?

No, no perf tests.

The old code in DOMImplStandardBase walked the DOM, so I thought it was
a pretty safe assumption that Webkit's .contains would be faster (either
from being a single JS call vs. many or, hopefully, by using some sort
of internal optimization).

I would be pretty surprised if element.contains is slower, but can still
put together some numbers if you'd like. Would you like me to look in to
this?

At this point, the new code is more complicated than the old code.

Well, DOMImplStandardBase is simpler. :-)

I don't think DOMImplIE9 is substantially more complex; it's just
calling/reusing some code from DOMImplTrident.

Granted, I also changed DOMImplTrident's logic, but that was because I
added more tests (that more than just elements, e.g. document and text
nodes) and fixed a unreported bug.

http://gwt-code-reviews.appspot.com/1725808/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to