Bug 250800

Summary: Fix moveTo to not use screenAvailableRect as an origin but as a boundary
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: DOMAssignee: Ahmad Saleem <ahmad.saleem792>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=21413

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
Radar WebKit Bug Importer
Comment 1 2023-01-25 15:40:18 PST
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
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.