Bug 58431

Summary: [GTK] Consider editable and non editable nodes when calculating selection offsets
Product: WebKit Reporter: Mario Sanchez Prada <mario>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mrobinson
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch proposal mrobinson: review+

Description Mario Sanchez Prada 2011-04-13 04:26:32 PDT
This bug is just to track a simple -yet needed- change in AccessibilityObjectWrapperAtk.cpp: replace usage of firstPositionInNode() with firstPositionInOrBeforeNode(), as well as lastPositionInNode() with lastPositionInOrAfterNode().

This is needed to ensure that the function getSelectionOffsetsForObject() works well both when non editable nodes can be present in the selection, since firstPositionInNode() and lastPositionInNode() don't work in those cases (they assume the node is editable).
Comment 1 Mario Sanchez Prada 2011-04-13 04:29:09 PDT
Created attachment 89364 [details]
Patch proposal

Attached patch proposal. Both API and Layout tests keep passing.
Comment 2 Martin Robinson 2011-04-13 08:25:20 PDT
Comment on attachment 89364 [details]
Patch proposal

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

> Source/WebCore/ChangeLog:8
> +        Use firstPositionInOrBeforeNode() and lastPositionInOrAfterNode().

Why not put the second paragraph of the bug description here? It will be useful for people looks through Trac or git.
Comment 3 Mario Sanchez Prada 2011-04-13 09:33:19 PDT
Committed r83747: <http://trac.webkit.org/changeset/83747>