[Webkit-unassigned] [Bug 26991] [Gtk] get_n_selections and get_selection fail when selecting text across object boundaries

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 10 02:04:35 PDT 2010


--- Comment #2 from Mario Sanchez Prada <msanchez at igalia.com>  2010-08-10 02:04:35 PST ---
I'm working on this and I found that currently one of the big issues to properly implement this is to reliably determine when a VisibleSelection belongs to the selected AccessibleObject, since such a selection is got right away from the frame (in a global fashion) and hence there's no API to actually do something like "get the node for that selection".

Hence, I was playing with some possibilities but all of them failed so far. Basically they were:

  - Get the containerNode for the selection (what current code does): doesn't work, as the returned node has nothing to do with DOM nodes (it's a node which parent is the #document node).

  - Check the absolute coords for the selection and check them against the extents of the selected node: I don't think that's a good way to do it since it could leave to false positives when different nodes are rendered in the same places (overlay text with CSS, for instance).

  - Trying to get the AccessibleObject from the renderer() associated to the base/extent/start/end of the VisibleSelection, and match it against the node associated to the selected object: in progress (still need to figure out what exactly those base/extent/start/end things mean and how to work with them)

So this is just a temporary braindump while I'm working on this. Perhaps someone wants to share something that shed some light on the topic :-)

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