New issue
Advanced search Search tips

Issue 822648 link

Starred by 0 users

Issue metadata

Status: WontFix
Owner:
Closed: Jan 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

chrome.windows.getCurrent returns wrong window size/position

Reported by gabr...@gsdb.net, Mar 16 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36

Steps to reproduce the problem:
chrome.windows.getCurrent or getAll return wrong window width/height/top/left on Windows if window is maximized. For some reason it says window width and height are 16px larger and window top and left are -8px (impossible since the window is maximized).

But... if window is fullscreen, getCurrent or getAll return perfect width/height/top/left. However, outerWidth and outerHeight give wrong values: 16px smaller. And screenY and screenX are +8px (!).

Example:

LINUX
My resolution = 1366x768
Task bar height = 28 (bottom)

Then outerWidth = 1366
     outerHeight = 768 - 28 = 740

chrome.windows.getCurrent({}, function(win) {
    console.log('Expected: ', outerWidth, outerHeight, screenY, screenX);
    console.log('   Given: ', win.width, win.height, win.top, win.left);
});

// --> Expected:  1366 740 0 0
          Given:  1366 740 0 0 (<---- OK!)

Now fullscreen:

// --> Expected:  1366 768 0 0
          Given:  1366 768 0 0 (<---- OK!)

WINDOWS 7
My resolution = 1366x768
Task bar height = 40 (bottom)

Then outerWidth = 1366
     outerHeight = 768 - 40 = 728

chrome.windows.getCurrent({}, function(win) {
    console.log('Expected: ', outerWidth, outerHeight, screenY, screenX);
    console.log('   Given: ', win.width, win.height, win.top, win.left);
});

// --> Expected:  1366 728 0 0
          Given:  1382 744 -8 -8 (<---- FAIL!)

Now fullscreen:

// --> Expected:  1350 752 8 8 (<---- FAIL, WTF?)
          Given:  1366 768 0 0 (<---- OK!)

What is the expected behavior?
chrome.windows.getCurrent should return correct size and position

What went wrong?
chrome.windows.getCurrent returns wrong size and position if maximized. If fullscreen, it returns correct values, but outerWidth, outerHeight, screenX and screenY return wrong values

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 65.0.3325.162  Channel: stable
OS Version: 16.04.3
Flash Version: 

Tested with
Chrome Stable 65.0.3325.162 (Ubuntu 16.04)
Chrome Stable 65.0.3325.162 (Windows 7)
Chrome Dev 66.0.3359.26 (Ubuntu 16.04)
Canary 67.0.3372.0 (Windows 7)
 
extension-test.zip
1.3 KB Download

Comment 1 by gabr...@gsdb.net, Mar 16 2018

FYI

**Firefox** results for comparison purposes:

LINUX
// --> Expected:  1366 714 0 0 (OK!)  *714 = 768(screen.height) - 28(taskbar) - 26(firefox bar on top)
          Given:  1366 714 0 0 (OK!)

Now fullscreen:

// --> Expected:  1366 768 0 0 (OK!)
          Given:  1366 768 0 0 (OK!)
          
          
WINDOWS 7
// --> Expected:  1382 744 -8 -8  (FAIL!)
          Given:  1382 744 -8 -8  (FAIL!)

Now fullscreen:

// --> Expected:  1366 768 0 0 (OK!)
          Given:  1366 768 0 0 (OK!)
Labels: Needs-Triage-M65
Labels: Needs-Feedback Triaged-ET
Tested the issue on chrome reported version 65.0.3325.162 using Ubuntu 14.04 with steps mentioned below:
1) Launched chrome reported version and installed extension as provided in comment#0
2) Clicked on extension and opened Devtools, In console able to see "Excepted" and "Given" values are same and "Result:OK"

@Reporter: Please find the attached screen cast for your reference and let us know if we missed anything in checking the issue, provide your feedback on it which helps us in further triaging it and let us know if this issue is specific to 16.04.

Thanks!
822648.ogv
2.8 MB View Download

Comment 4 by gabr...@gsdb.net, Mar 20 2018

Thanks for testing it.

The bug only affects Windows.

Comment 5 by gabr...@gsdb.net, Mar 20 2018

I have tested it with Windows 7. I still need to test it with Windows 10.
Project Member

Comment 6 by sheriffbot@chromium.org, Mar 20 2018

Cc: viswa.karala@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: vamshi.kommuri@chromium.org
Components: Platform>DevTools
Labels: -OS-Linux M-67 Target-67 FoundIn-67 OS-Windows
Status: Untriaged (was: Unconfirmed)
As per comment#4 and #5 checked the issue on windows 7.

Able to reproduce the issue on reported chrome version 65.0.3325.162 and latest canary 67.0.3377.0 using Windows 7. 
Note: Issue is not seen on Mac 10.13.1 and Ubuntu 14.04.

As the issue is seen from M60(60.0.3080.0) considering it as Non-Regression and marking it as Untriaged.

Tentatively adding component "Platform>DevTools", please change if this doesn't suite.  Requesting someone from dev team to have a look into it and help in further triaging.

Thanks!
++ Issue is seen on Windows 10.

Comment 9 by l...@chromium.org, Apr 2 2018

Components: -Platform>DevTools Platform>Extensions>API UI>Aura
Doesn't seem DevTools related, maybe Extensions API or Aura.
Cc: sadrul@chromium.org sky@chromium.org
[Extensions Triage] This should be using BrowserView::GetBounds (https://cs.chromium.org/chromium/src/chrome/browser/extensions/extension_tab_util.cc?sq=package:chromium&dr&g=0&l=463), 

sky@/sadrul@: Can you help triage this?
Owner: sky@chromium.org
Status: WontFix (was: Untriaged)
On windows maximized windows are *bigger* than the display: https://blogs.msdn.microsoft.com/oldnewthing/20150304-00/?p=44543 .

Sign in to add a comment