The CharacterOffset that is converted from the VisiblePosition is wrong in such case.
<rdar://problem/26071274>
<rdar://problem/26131216>
Created attachment 278215 [details] Initial patch
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
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.
Committed r200508: <http://trac.webkit.org/changeset/200508>
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 "(".