Bug 207624 - [GTK] imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html is failing since r256207
Summary: [GTK] imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection...
Status: RESOLVED DUPLICATE of bug 237641
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-12 04:01 PST by Diego Pino
Modified: 2022-04-28 20:29 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Pino 2020-02-12 04:01:34 PST
* imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html [ Failure ]

Diff:

imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html
15,18c15,18
< PASS input direction of setSelectionRange(0,1,"none") 
< PASS input direction of setSelectionRange(0,1,"hoge") 
< PASS input direction of setSelectionRange(0,1,"BACKWARD") 
< PASS input direction of setSelectionRange(0,1) 
---
> FAIL input direction of setSelectionRange(0,1,"none") assert_equals: expected "none" but got "forward"
> FAIL input direction of setSelectionRange(0,1,"hoge") assert_equals: expected "none" but got "forward"
> FAIL input direction of setSelectionRange(0,1,"BACKWARD") assert_equals: expected "none" but got "forward"
> FAIL input direction of setSelectionRange(0,1) assert_equals: expected "none" but got "forward"
40,43c40,43
< PASS textarea direction of setSelectionRange(0,1,"none") 
< PASS textarea direction of setSelectionRange(0,1,"hoge") 
< PASS textarea direction of setSelectionRange(0,1,"BACKWARD") 
< PASS textarea direction of setSelectionRange(0,1) 
---
> FAIL textarea direction of setSelectionRange(0,1,"none") assert_equals: expected "none" but got "forward"
> FAIL textarea direction of setSelectionRange(0,1,"hoge") assert_equals: expected "none" but got "forward"
> FAIL textarea direction of setSelectionRange(0,1,"BACKWARD") assert_equals: expected "none" but got "forward"
> FAIL textarea direction of setSelectionRange(0,1) assert_equals: expected "none" but got "forward"
Comment 1 Diego Pino 2022-01-17 17:42:22 PST
I've been investigating this bug.

The error occurs on `HTMLTextFormControlElement.cpp::computeSelectionDirection`. More precisely in this line:

https://webkit-search.igalia.com/webkit/source/Source/WebCore/html/HTMLTextFormControlElement.cpp#420

The method returns `SelectionHasNoDirection` (expected result) when `document.frame()` is null. For some reason, in GLIB based ports `document.frame()` is not null thus the method continues its execution and eventually returns "forward".
Comment 2 Arcady Goldmints-Orlov 2022-04-28 20:29:25 PDT
This has been fixed by r291396. Closing this bug as duplicate.

*** This bug has been marked as a duplicate of bug 237641 ***