<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>207624</bug_id>
          
          <creation_ts>2020-02-12 04:01:34 -0800</creation_ts>
          <short_desc>[GTK] imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html is failing since r256207</short_desc>
          <delta_ts>2022-04-28 20:29:25 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>237641</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Diego Pino">dpino</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>crzwdjk</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1617929</commentid>
    <comment_count>0</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2020-02-12 04:01:34 -0800</bug_when>
    <thetext>* 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
&lt; PASS input direction of setSelectionRange(0,1,&quot;none&quot;) 
&lt; PASS input direction of setSelectionRange(0,1,&quot;hoge&quot;) 
&lt; PASS input direction of setSelectionRange(0,1,&quot;BACKWARD&quot;) 
&lt; PASS input direction of setSelectionRange(0,1) 
---
&gt; FAIL input direction of setSelectionRange(0,1,&quot;none&quot;) assert_equals: expected &quot;none&quot; but got &quot;forward&quot;
&gt; FAIL input direction of setSelectionRange(0,1,&quot;hoge&quot;) assert_equals: expected &quot;none&quot; but got &quot;forward&quot;
&gt; FAIL input direction of setSelectionRange(0,1,&quot;BACKWARD&quot;) assert_equals: expected &quot;none&quot; but got &quot;forward&quot;
&gt; FAIL input direction of setSelectionRange(0,1) assert_equals: expected &quot;none&quot; but got &quot;forward&quot;
40,43c40,43
&lt; PASS textarea direction of setSelectionRange(0,1,&quot;none&quot;) 
&lt; PASS textarea direction of setSelectionRange(0,1,&quot;hoge&quot;) 
&lt; PASS textarea direction of setSelectionRange(0,1,&quot;BACKWARD&quot;) 
&lt; PASS textarea direction of setSelectionRange(0,1) 
---
&gt; FAIL textarea direction of setSelectionRange(0,1,&quot;none&quot;) assert_equals: expected &quot;none&quot; but got &quot;forward&quot;
&gt; FAIL textarea direction of setSelectionRange(0,1,&quot;hoge&quot;) assert_equals: expected &quot;none&quot; but got &quot;forward&quot;
&gt; FAIL textarea direction of setSelectionRange(0,1,&quot;BACKWARD&quot;) assert_equals: expected &quot;none&quot; but got &quot;forward&quot;
&gt; FAIL textarea direction of setSelectionRange(0,1) assert_equals: expected &quot;none&quot; but got &quot;forward&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1831601</commentid>
    <comment_count>1</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2022-01-17 17:42:22 -0800</bug_when>
    <thetext>I&apos;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 &quot;forward&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1865332</commentid>
    <comment_count>2</comment_count>
    <who name="Arcady Goldmints-Orlov">crzwdjk</who>
    <bug_when>2022-04-28 20:29:25 -0700</bug_when>
    <thetext>This has been fixed by r291396. Closing this bug as duplicate.

*** This bug has been marked as a duplicate of bug 237641 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>