RESOLVED FIXED 157403
AX: String for document range is empty if end visible position anchors to a ignored replaced node
https://bugs.webkit.org/show_bug.cgi?id=157403
Summary AX: String for document range is empty if end visible position anchors to a i...
Nan Wang
Reported 2016-05-05 18:11:28 PDT
The CharacterOffset that is converted from the VisiblePosition is wrong in such case.
Attachments
Initial patch (5.96 KB, patch)
2016-05-05 18:25 PDT, Nan Wang
cfleizach: review+
Nan Wang
Comment 1 2016-05-05 18:11:50 PDT
Radar WebKit Bug Importer
Comment 2 2016-05-05 18:12:00 PDT
Nan Wang
Comment 3 2016-05-05 18:25:20 PDT
Created attachment 278215 [details] Initial patch
chris fleizach
Comment 4 2016-05-05 23:25:40 PDT
Comment on attachment 278215 [details] Initial patch View in context: https://bugs.webkit.org/attachment.cgi?id=278215&action=review > Source/WebCore/accessibility/AXObjectCache.cpp:2000 > + // Sometimes when the node is a replaced node and is ignored in accessibility, we get wrong CharacterOffset from it. we get "a" wrong > Source/WebCore/accessibility/AXObjectCache.cpp:2002 > + if (result.remainingOffset > 0 && !result.isNull() && isRendererReplacedElement(result.node->renderer())) is remainingOffset signed or unsigned.... if unsigned you can drop the > 0
Nan Wang
Comment 5 2016-05-06 00:23:16 PDT
Comment on attachment 278215 [details] Initial patch View in context: https://bugs.webkit.org/attachment.cgi?id=278215&action=review >> Source/WebCore/accessibility/AXObjectCache.cpp:2002 >> + if (result.remainingOffset > 0 && !result.isNull() && isRendererReplacedElement(result.node->renderer())) > > is remainingOffset signed or unsigned.... if unsigned you can drop the > 0 It's signed int.
Nan Wang
Comment 6 2016-05-06 00:26:41 PDT
Darin Adler
Comment 7 2016-05-06 12:23:28 PDT
Comment on attachment 278215 [details] Initial patch View in context: https://bugs.webkit.org/attachment.cgi?id=278215&action=review >>> Source/WebCore/accessibility/AXObjectCache.cpp:2002 >>> + if (result.remainingOffset > 0 && !result.isNull() && isRendererReplacedElement(result.node->renderer())) >> >> is remainingOffset signed or unsigned.... if unsigned you can drop the > 0 > > It's signed int. Extra space after "if" before "(".
Note You need to log in before you can comment on or make changes to this bug.