[Webkit-unassigned] [Bug 122644] [ATK] Simplify implementation of atk_text_get_text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 15 09:55:36 PDT 2013


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





--- Comment #6 from chris fleizach <cfleizach at apple.com>  2013-10-15 09:54:21 PST ---
(In reply to comment #5)
> (In reply to comment #4)
> > (From update of attachment 213996 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=213996&action=review
> > 
> > > Source/WebCore/accessibility/AccessibilityRenderObject.cpp:-2113
> > > -    if (range.start + range.length > elementText.length())
> > 
> > why remove this check? it seems like a good safety check to have here
> 
> I have three reasons mainly :):
> 
> 1. Because I think it's checking the wrong thing, since a proper check to see if the range is out of bounds would be something like this, IMO:
> 
>    (range.length - range.start > elementText.length())

I think that's wrong. I think we still want to check the MAXRange of that range, which would be +.

> 
> 2. Because in any case the String::substring() method will check, and adjust if needed, any limit that falls out of bounds for that string.

If it in fact does do this, then it's OK to remove. I was assuming that would throw an error

> 
> 3. Because that way ranges like (0, -1) will actually work as "request all the test", and that's convenient from the ATK perspective (yet I understand it might be not the best reason)

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