[Webkit-unassigned] [Bug 118908] [ATK] Issues with edge cases when getting offsets for a text range in AtkText

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 24 14:09:25 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=118908





--- Comment #4 from Mario Sanchez Prada <mario at webkit.org>  2013-07-24 14:09:15 PST ---
(In reply to comment #3)
> [...]
> > > Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp:538
> > > +        startOffset = comparePositions(selection.start(), firstValidPosition) < 0 ? 0 : accessibilityObjectLength(coreObject);
> > 
> > So if the selection is after the node then you return 
> > accessibilityObjectLength 
> > as the start and end offsets?
> 
> Yes. If we reached that point it means that the selection falls *entirely* 
> out of the range associated to the accessibility object, so we need to return 
> a zero-length offsets range.
> 
> Now the reason why we return accesibilityObjectLength in that case is because 
> in that situation the selection happens to be after the accessibility object, 
> and so we must return a zero-length range coherent with that, since that's 
> what other ATK implementations do.
> 
> Just think of it as normalizing the start and end offsets to the correct side 
> of the text range associated to the object, so you either will have [0, 0] 
> when the selection is before the object or [n, n] when it's after it.
> 
Chris, could you take an additional quick look to this patch before landing it, just to make sure that the a11y specific bits make sense?

I forgot to mention it in my previous comment, but both Martin and me think that it would be very valuable if you could double check the patch before committing it.

Thanks!

-- 
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