Range.isPointInRange check root node before verifying offset
https://bugs.webkit.org/show_bug.cgi?id=148776
isPointInRange should never throw WrongDocumentError
https://bugs.webkit.org/show_bug.cgi?id=148779
Reviewed by Darin Adler.
Source/WebCore:
Fixed two bugs since they were inter-dependent on each other.
We use the same trick we used for comparePoint in r189327 to avoid O(n) operation in common cases
and return false when either calls to compareBoundaryPoints yields a WrongDocumentError.
No new tests since this is covered by an existing W3C test.
* dom/Range.cpp:
(WebCore::Range::isPointInRange):
(WebCore::Range::comparePoint):
LayoutTests:
Rebaselined the test now that all test cases pass.
* http/tests/w3c/dom/ranges/Range-isPointInRange-expected.txt:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189347
268f45cc-cd09-0410-ab3c-
d52691b4dbfc