[Webkit-unassigned] [Bug 250800] Fix moveTo to not use screenAvailableRect as an origin but as a boundary

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 11 15:06:43 PST 2024


https://bugs.webkit.org/show_bug.cgi?id=250800

--- Comment #3 from Ahmad Saleem <ahmad.saleem792 at gmail.com> ---
(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));
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240111/753b64a2/attachment.htm>


More information about the webkit-unassigned mailing list