Bug 214068 - REGRESSION (r264037) [GTK][WPE] accessibility/textarea-selected-text-range.html is failing for collapsed ranges
Summary: REGRESSION (r264037) [GTK][WPE] accessibility/textarea-selected-text-range.ht...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-07 19:25 PDT by Lauro Moura
Modified: 2020-10-06 07:55 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2020-07-07 19:25:04 PDT
r264037 changed the behavior of AccessibilityRenderObject::setSelectedVisiblePositionRange for the cases where the selection range is 0.

This made accessibility/textarea-selected-text-range.html to fail, returning (0,0) from selectedTextRange when the length given to setSelectedTextRange is zero.

In AccessibilityUIElementAtk.cpp's AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length), there is this snippet which might be related:

  1888     if (!length)
     1         return atk_text_set_caret_offset(ATK_TEXT(m_element.get()), location);
     2
     3     return atk_text_set_selection(ATK_TEXT(m_element.get()), 0, location, location + length);

Link to the results history: https://results.webkit.org/?suite=layout-tests&test=accessibility%2Ftextarea-selected-text-range.html
Comment 1 Radar WebKit Bug Importer 2020-07-07 19:25:16 PDT
<rdar://problem/65204399>
Comment 2 Lauro Moura 2020-07-08 21:09:56 PDT
264129 changed the test to wait for the expected results instead of checking right away due to the AccessibilityController async nature, causing it to timeout instead of fail.
Comment 3 Diego Pino 2020-10-06 07:55:46 PDT
Test is passing since r266295.