Let document.caretPositionFromPoint work correctly in text control.
If the point is inside input/text area element, the CaretPosition
should have offsetNode
pointing to the text control element instead
of the inner editor element inside the user-agent shadow tree.
The behavior is also defined in step 4 of the
spec1.
Bug: 41487363
Change-Id: I1c024bdf6ce9620905a28487c8c91383f2086a54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5531199
Reviewed-by: Koji Ishii kojii@chromium.org
Reviewed-by: Sanket Joshi sajos@microsoft.com
Reviewed-by: Mason Freed masonf@chromium.org
Commit-Queue: Siye Liu siliu@microsoft.com
Cr-Commit-Position: refs/heads/main@{#1301622}