DescriptionDevTools: fix offset condition in console viewport _selectedText and add tests
When selecting non-truncated text, the selection start offset == 1 and the
selected node has text length > 1, the viewport would return incorrect values
for _selectedText(). It should only use the untruncated offset when it differs
from the node's rendered text length.
This CL corrects the condition and adds tests for other cases.
BUG=722497
Review-Url: https://codereview.chromium.org/2900733003
Cr-Commit-Position: refs/heads/master@{#477809}
Committed: https://chromium.googlesource.com/chromium/src/+/46ab10923ea52c1e02980027a5e098ae25e904b7
Patch Set 1 : clean #Patch Set 2 : checking for failure #Patch Set 3 : fix offset correction condition #
Messages
Total messages: 25 (18 generated)
|