After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 697779 - atk_text_get_text_at_offset for ATK_TEXT_BOUNDARY_WORD_END is not consistent
atk_text_get_text_at_offset for ATK_TEXT_BOUNDARY_WORD_END is not consistent
Status: RESOLVED OBSOLETE
Product: atk
Classification: Platform
Component: atk
unspecified
Other All
: Normal normal
: ---
Assigned To: ATK maintainer(s)
ATK maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-04-11 11:11 UTC by Alexander Surkov
Modified: 2021-06-10 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexander Surkov 2013-04-11 11:11:05 UTC
The test string "a paragraph"

ATK spec states (https://developer.gnome.org/atk/stable/AtkText.html#atk-text-get-text-at-offset):

"If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string is from the word end before the offset to the word end at or after the offset. "

then ('', 0, 0) seems reasonable as failure result because there's no the word end *before* 0 offset.

however

"The returned string will contain the word at the offset if the offset is inside a word and will contain the word after to the offset if the offset is not inside a word. "

makes ('a ', 0, 2) reasonable because 0 offset is inside word offset of 'a' word.

It'd be great if you clarify the spec. It's urgent for Firefox accessibility.
Comment 1 Alexander Surkov 2013-04-11 12:35:30 UTC
(In reply to comment #0)

> "The returned string will contain the word at the offset if the offset is
> inside a word and will contain the word after to the offset if the offset is
> not inside a word. "
> 
> makes ('a ', 0, 2) reasonable because 0 offset is inside word offset of 'a'
> word.

correction: should be (a', 0, 1) because 1 is the end offset of 'a' word
Comment 2 Alexander Surkov 2013-04-11 14:37:55 UTC
Word start boundary is a dual case to described one for character count offset:

" If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string is from the word start at or before the offset to the word start after the offset. "

there's no offset *after* character count offset

and 

" The returned string will contain the word at the offset if the offset is inside a word and will contain the word before the offset if the offset is not inside a word. "

but this one assumes that last word should be returned ("a paragraph")
Comment 3 André Klapper 2021-06-10 11:26:43 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of atk, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a ticket at
  https://gitlab.gnome.org/GNOME/atk/-/issues/

Thank you for your understanding and your help.