<?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>250800</bug_id>
          
          <creation_ts>2023-01-18 15:39:59 -0800</creation_ts>
          <short_desc>Fix moveTo to not use screenAvailableRect as an origin but as a boundary</short_desc>
          <delta_ts>2024-10-15 10:35:30 -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>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=21413</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Ahmad Saleem">ahmad.saleem792</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1926440</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-01-18 15:39:59 -0800</bug_when>
    <thetext>Hi Team,

While going through Blink&apos;s commit, I came across another failing tests (where all browsers are failing few tests but Safari is failing more than others):

Test Case - https://jsfiddle.net/84rogcy7/show

^ Safari 16.2 &amp; STP 161 are failing:

Testing - xxx with 0 arguments &amp; Testing - xxx with with 1 argument where it suppose to throw exception, it is throwing undefined. While Chrome Canary 111 and Firefox Nightly 111 passes these.

All browsers are failing two arguments tests.

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/f7557ab98c0e2bb380f9bfc6355666434c6e481f

WebKit Source - https://searchfox.org/wubkat/source/Source/WebCore/page/DOMWindow.cpp#1813

Just wanted to raise to get input and whether it is good to fix at least 0 and 1 argument cases to match other browsers.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1928308</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-01-25 15:40:18 -0800</bug_when>
    <thetext>&lt;rdar://problem/104670843&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1995420</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-11-28 15:04:02 -0800</bug_when>
    <thetext>This compiles:

void LocalDOMWindow::moveTo(int x, int y) const
{
    if (!allowedToChangeWindowGeometry())
        return;
    CheckedPtr page = frame()-&gt;page();
    auto update = page-&gt;chrome().windowRect();
    RefPtr localMainFrame = dynamicDowncast&lt;LocalFrame&gt;(page-&gt;mainFrame());
    if (!localMainFrame)
        return;
    update.setLocation(LayoutPoint(x, y));
    page-&gt;chrome().setWindowRect(adjustWindowRect(*page, update));
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2004552</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-01-11 15:06:43 -0800</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #2)
&gt; This compiles:
&gt; 
&gt; void LocalDOMWindow::moveTo(int x, int y) const
&gt; {
&gt;     if (!allowedToChangeWindowGeometry())
&gt;         return;
&gt;     CheckedPtr page = frame()-&gt;page();
&gt;     auto update = page-&gt;chrome().windowRect();
&gt;     RefPtr localMainFrame = dynamicDowncast&lt;LocalFrame&gt;(page-&gt;mainFrame());
&gt;     if (!localMainFrame)
&gt;         return;
&gt;     update.setLocation(LayoutPoint(x, y));
&gt;     page-&gt;chrome().setWindowRect(adjustWindowRect(*page, update));
&gt; }

This is updated:

void LocalDOMWindow::moveTo(int x, int y) const
{
    if (!allowedToChangeWindowGeometry())
        return;

    RefPtr page = frame()-&gt;page();
    auto update = page-&gt;chrome().windowRect();
    RefPtr localMainFrame = dynamicDowncast&lt;LocalFrame&gt;(page-&gt;mainFrame());
    if (!localMainFrame)
        return;

    update.setLocation(LayoutPoint(x, y));
    page-&gt;chrome().setWindowRect(adjustWindowRect(*page, update));
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2068008</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-10-15 02:46:17 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/35210</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2068096</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-10-15 10:35:28 -0700</bug_when>
    <thetext>Committed 285205@main (ee0481b506b2): &lt;https://commits.webkit.org/285205@main&gt;

Reviewed commits have been landed. Closing PR #35210 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>