[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:42:16 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=122644
--- Comment #5 from Mario Sanchez Prada <mario at webkit.org> 2013-10-15 09:41:00 PST ---
(In reply to comment #4)
> (From update of attachment 213996 [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())
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.
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