Bug 169940

Summary: AX: WebKit is returning the wrong rangeForLine
Product: WebKit Reporter: Nan Wang <n_wang>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, apinheiro, buildbot, cfleizach, commit-queue, dmazzoni, jcraig, jdiggs, n_wang, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
none
patch none

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.