Bug 58431 - [GTK] Consider editable and non editable nodes when calculating selection offsets
Summary: [GTK] Consider editable and non editable nodes when calculating selection off...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2011-04-13 04:26 PDT by Mario Sanchez Prada
Modified: 2011-04-13 09:33 PDT (History)
1 user (show)

See Also:


Attachments
Patch proposal (3.33 KB, patch)
2011-04-13 04:29 PDT, Mario Sanchez Prada
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>