New issue
Advanced search Search tips

Issue 681511 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

popups should not be allowed to move themselves (mostly) offscreen

Project Member Reported by jochen@chromium.org, Jan 16 2017

Issue description

similar to how we enforce a min-size, we should enforce a min-fraction-on-screen
 

Comment 1 by jochen@chromium.org, Mar 29 2017

Cc: ojan@chromium.org
Ojan, here's another one I could use help with.

It seems that the bug is mostly that the calculation of the minimal size doens't take the size of the window bar etc into account, so the popup ends up mostly offscreen

Comment 2 by jochen@chromium.org, Jul 19 2017

Issue 744252 has been merged into this issue.

Comment 3 by timloh@chromium.org, Sep 12 2017

If you call moveTo immediately after creation, the popup ends up completely offscreen (at least on Win/Linux/CrOS).

W = window.open('about:blank','','resizable=1,menubar=0,status=1')
W.moveTo(10000, 10000);

ChromeClient::SetWindowRectWithAdjustment() seems to get values of 0 for the width/height, so the calculation that should clamp the window to within the screen ends up putting it just outside the screen...
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/645830fb7e029ee6d8debeb6902952a2158485e4

commit 645830fb7e029ee6d8debeb6902952a2158485e4
Author: Jochen Eisinger <jochen@chromium.org>
Date: Thu Oct 05 17:06:00 2017

Ensure popups can't be moved off-screen

BUG= 681511 
R=mkwst@chromium.org

Change-Id: I351b28a09bfe09e5045ada5e228f8f0958a9eccb
Reviewed-on: https://chromium-review.googlesource.com/700264
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506771}
[add] https://crrev.com/645830fb7e029ee6d8debeb6902952a2158485e4/third_party/WebKit/LayoutTests/fast/dom/Window/window-moveto-popup.html
[modify] https://crrev.com/645830fb7e029ee6d8debeb6902952a2158485e4/third_party/WebKit/Source/core/page/ChromeClient.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment