WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
250800
Fix moveTo to not use screenAvailableRect as an origin but as a boundary
https://bugs.webkit.org/show_bug.cgi?id=250800
Summary
Fix moveTo to not use screenAvailableRect as an origin but as a boundary
Ahmad Saleem
Reported
2023-01-18 15:39:59 PST
Hi Team, While going through Blink'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 & STP 161 are failing: Testing - xxx with 0 arguments & 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!
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-01-25 15:40:18 PST
<
rdar://problem/104670843
>
Ahmad Saleem
Comment 2
2023-11-28 15:04:02 PST
This compiles: void LocalDOMWindow::moveTo(int x, int y) const { if (!allowedToChangeWindowGeometry()) return; CheckedPtr page = frame()->page(); auto update = page->chrome().windowRect(); RefPtr localMainFrame = dynamicDowncast<LocalFrame>(page->mainFrame()); if (!localMainFrame) return; update.setLocation(LayoutPoint(x, y)); page->chrome().setWindowRect(adjustWindowRect(*page, update)); }
Ahmad Saleem
Comment 3
2024-01-11 15:06:43 PST
(In reply to Ahmad Saleem from
comment #2
)
> This compiles: > > void LocalDOMWindow::moveTo(int x, int y) const > { > if (!allowedToChangeWindowGeometry()) > return; > CheckedPtr page = frame()->page(); > auto update = page->chrome().windowRect(); > RefPtr localMainFrame = dynamicDowncast<LocalFrame>(page->mainFrame()); > if (!localMainFrame) > return; > update.setLocation(LayoutPoint(x, y)); > page->chrome().setWindowRect(adjustWindowRect(*page, update)); > }
This is updated: void LocalDOMWindow::moveTo(int x, int y) const { if (!allowedToChangeWindowGeometry()) return; RefPtr page = frame()->page(); auto update = page->chrome().windowRect(); RefPtr localMainFrame = dynamicDowncast<LocalFrame>(page->mainFrame()); if (!localMainFrame) return; update.setLocation(LayoutPoint(x, y)); page->chrome().setWindowRect(adjustWindowRect(*page, update)); }
Ahmad Saleem
Comment 4
2024-10-15 02:46:17 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/35210
EWS
Comment 5
2024-10-15 10:35:28 PDT
Committed
285205@main
(ee0481b506b2): <
https://commits.webkit.org/285205@main
> Reviewed commits have been landed. Closing PR #35210 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug