[Webkit-unassigned] [Bug 53388] [Gtk] atk_text_set_caret_offset fails for list items

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 31 03:11:17 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=53388





--- Comment #1 from Mario Sanchez Prada <msanchez at igalia.com>  2011-01-31 03:11:17 PST ---
Hmmm... I think we're gonna have an extra problem in here, sorry :-(

As you probably remember, we in the past did a change to properly expose list items markers ('1. ', '* ' ...) as part of the list item text through the AtkText interface.

However, that exposure was made in a very artificial way, letting the Atk wrapper dynamically add that 'prefix' (or suffix, for Right-To-Left styles) to the item's text when requested through atk_text_get_text(). Also some additional tweaks were done to properly report the size of the text, the position of the caret and so on.

This hack was needed to workaround that WebKit doesn't represent internally item's markers as part of the items, but as child objects for them, and that is the expected behavior in other ports (e.g. mac) so we couldn't change that in WebCore.

And now that became an issue again because there's another difference: in WebKit list item markers do not allow to put the caret inside of them, so you never get the cursor, for instance, in the middle of '1' and '.' for an item with text '1. This is an item'.

What does this have to do with this bug? Well, actually the bug itself is about to being able to place the cursor in the item's text, not in the marker, so it's not a 1-1 relationship, but related anyway because I wonder what to do in this case:

Suppose the following list item:

  1. A first item

If I position accerciser in the item's accessible object and want to set the caret right before 'first', which one of these would be the right one?:

  (A) atk_text_set_caret_offset(obj, 5)
  (B) atk_text_set_caret_offset(obj, 2)

I guess the right one would be (A), since the text exposed includes the marker, but then I wonder what should be the expected behaviour if I did atk_text_set_caret_offset(obj, i) with 0 <= i < 3, since the cursor can't be placed in the marker.

Probably the best solution would include making it possible to place the caret in the list item's marker, but not sure how feasible that is at this point, so sharing these thoughts now to see if we can think of something better.

As I said, this is not directly related to the bug reported, but highly related IMHO (and probably needing another bug), but I think it's worth telling anyway. Sorry for the long comment

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list