Bug 169940 - AX: WebKit is returning the wrong rangeForLine
Summary: AX: WebKit is returning the wrong rangeForLine
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-21 18:34 PDT by Nan Wang
Modified: 2017-03-22 13:30 PDT (History)
11 users (show)

See Also:


Attachments
patch (5.94 KB, patch)
2017-03-21 18:44 PDT, Nan Wang
no flags Details | Formatted Diff | Diff
patch (6.97 KB, patch)
2017-03-22 12:29 PDT, Nan Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nan Wang 2017-03-21 18:34:21 PDT
In content editable with multiple lines, webkit is giving a wrong range for line and omitting the first character of that line.

<rdar://problem/30942088>
Comment 1 Nan Wang 2017-03-21 18:44:29 PDT
Created attachment 305061 [details]
patch
Comment 2 chris fleizach 2017-03-22 10:35:14 PDT
Comment on attachment 305061 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=305061&action=review

> LayoutTests/accessibility/mac/range-for-contenteditable-newline.html:54
> +    var rangeForLine = textControl3.rangeForLine(1);

do we need to worry about lineForRange as well? we should probably add some test just to be sure
Comment 3 chris fleizach 2017-03-22 10:37:08 PDT
Comment on attachment 305061 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=305061&action=review

> LayoutTests/accessibility/mac/range-for-contenteditable-newline.html:17
> +<p>jumped over the lazy dog</p>

if we put a <pre> inside of a content editable and then just used regular newlines, do we have any other issues
Comment 4 Nan Wang 2017-03-22 12:29:43 PDT
Created attachment 305114 [details]
patch

updated test
Comment 5 WebKit Commit Bot 2017-03-22 13:30:45 PDT
Comment on attachment 305114 [details]
patch

Clearing flags on attachment: 305114

Committed r214274: <http://trac.webkit.org/changeset/214274>
Comment 6 WebKit Commit Bot 2017-03-22 13:30:48 PDT
All reviewed patches have been landed.  Closing bug.