Drop unnecessary ancestor traversal in Range::selectNode().
Drop unnecessary ancestor traversal in Range::selectNode().

It traversed the ancestors to throw a INVALID_NODE_TYPE_ERR if one of them was a DocumentType Node. However, it is impossible for a DocumentType Node to have children.

Picked from webkit https://trac.webkit.org/changeset/190145

No new tests, covered by existing tests.

BUG=None

Review URL: https://codereview.chromium.org/1363833002

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#351046}

axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk