Do not create temporary Range in AXLayoutObject::IndexForVisiblePosition

The above mentioned function measures length between two positions,
which doesn't really need a Range object. Hence, this patch changes the
function not to create a temporary Range object to reduce memory impact.

Bug: 388681
Change-Id: I6fb1b325b74e7331da1ecffef895330f88f22e92
Reviewed-on: https://chromium-review.googlesource.com/616230
Reviewed-by: Dominic Mazzoni <[email protected]>
Commit-Queue: Xiaocheng Hu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#494877}
1 file changed