Bug 53300

Summary: [GTK] Caret Offset is one off at the end of wrapped lines
Product: WebKit Reporter: Joanmarie Diggs (irc: joanie) <jdiggs>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: apinheiro, mario
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 25531    
Attachments:
Description Flags
test case
none
Patch proposal + unit test mrobinson: review+

Description Joanmarie Diggs (irc: joanie) 2011-01-28 06:46:01 PST
Created attachment 80446 [details]
test case

Steps to reproduce:

1. Load the test case in Epiphany.

2. Launch Accerciser and select the accessible object associated with the paragraph from the test case.

3. Query the accessible text interface for the paragraph and use it to do the following:

A. Position the caret one character to the left of the end of a line. Then check the caret offset.

B. Position the caret at the end of the line from step 3A. Then check the caret offset.

C. Position the caret at the beginning of the next line. Then check the caret offset.

In [1]: text=acc.queryText()
In [2]: text.caretOffset
Out[2]: 110 <-- (one character before end of line)
In [3]: text.caretOffset
Out[3]: 112 <-- (end of line)
In [4]: text.caretOffset
Out[4]: 112 <-- (start of next line)
In [5]: text.caretOffset
Out[5]: 227 <-- (one character before end of line)
In [6]: text.caretOffset
Out[6]: 229 <-- (end of line)
In [7]: text.caretOffset
Out[7]: 229 <-- (start of next line)

The impact of this bug is that Orca incorrectly presents the character/word at the end of the line when the user is navigating by character/word. (We wind up repeating the start of the following line.)
Comment 1 Joanmarie Diggs (irc: joanie) 2011-01-28 12:28:06 PST
See also bug 53323 which *might* be related (?)
Comment 2 Mario Sanchez Prada 2011-01-31 11:18:32 PST
Created attachment 80662 [details]
Patch proposal + unit test

Attached patch proposal + unit test
Comment 3 Mario Sanchez Prada 2011-02-01 01:49:58 PST
Committed r77233: <http://trac.webkit.org/changeset/77233>