Bug 237821

Summary: [AT-SPI] accessibility/native-text-control-attributed-string.html is failing
Product: WebKit Reporter: Lauro Moura <lmoura>
Component: New BugsAssignee: Lauro Moura <lmoura>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, cgarcia, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=237820
Attachments:
Description Flags
Patch
none
Patch with bugnumber
none
Updated patch skipping out of range
none
Patch for landing none

Description Lauro Moura 2022-03-13 23:08:24 PDT
[AT-SPI] accessibility/native-text-control-attributed-string.html is failing
Comment 1 Lauro Moura 2022-03-13 23:09:01 PDT
Created attachment 454564 [details]
Patch
Comment 2 Lauro Moura 2022-03-13 23:10:01 PDT
Created attachment 454565 [details]
Patch with bugnumber
Comment 3 Lauro Moura 2022-03-13 23:14:26 PDT
Comment on attachment 454565 [details]
Patch with bugnumber

View in context: https://bugs.webkit.org/attachment.cgi?id=454565&action=review

> LayoutTests/platform/gtk/accessibility/native-text-control-attributed-string-expected.txt:51
> +Attributed string for range (5, 10):

In the mac expectation, this range has positions outside the string and ends up returning null. Should we do the same?

> LayoutTests/platform/gtk/accessibility/native-text-control-attributed-string-expected.txt:66
> +Attributed string for range (10, 1):

Ditto.
Comment 4 Carlos Garcia Campos 2022-03-15 06:37:42 PDT
Comment on attachment 454565 [details]
Patch with bugnumber

View in context: https://bugs.webkit.org/attachment.cgi?id=454565&action=review

>> LayoutTests/platform/gtk/accessibility/native-text-control-attributed-string-expected.txt:51
>> +Attributed string for range (5, 10):
> 
> In the mac expectation, this range has positions outside the string and ends up returning null. Should we do the same?

Yes, for consistency. I guess we just need to check the range is valid and return null otherwise.
Comment 5 Radar WebKit Bug Importer 2022-03-20 23:09:18 PDT
<rdar://problem/90552509>
Comment 6 Lauro Moura 2022-03-24 20:11:56 PDT
Created attachment 455721 [details]
Updated patch skipping out of range

The -1,1 out of range case still returns an attribute string as the location arrives as 0, like in the mac port
Comment 7 Carlos Garcia Campos 2022-03-25 01:24:46 PDT
Comment on attachment 455721 [details]
Updated patch skipping out of range

View in context: https://bugs.webkit.org/attachment.cgi?id=455721&action=review

> Tools/WebKitTestRunner/InjectedBundle/atspi/AccessibilityUIElementAtspi.cpp:1169
> +    auto text = m_element->text();

You should also move m_element->updateBackingStore(); here, before calling text().
Comment 8 Lauro Moura 2022-03-28 13:52:18 PDT
Created attachment 455949 [details]
Patch for landing
Comment 9 EWS 2022-03-28 18:21:45 PDT
Committed r292019 (248963@main): <https://commits.webkit.org/248963@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 455949 [details].