Commit 17e710e3 authored by Kuo Jen Wei's avatar Kuo Jen Wei Committed by Commit Bot

[CCA] Fix logic of judging isWindowFullSize.

Consider shelf on left/right or top/bottom side, either width or
height of window outer bound equal screen size should be fullscreen.

Bug: 1008347
Test: Cases of shelf on left/right or bottom, window resizing related
function works as expected.

Change-Id: Id381bac95c9287e3febfdebb6ac74333283f7071
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1828784
Auto-Submit: Kuo Jen Wei <inker@chromium.org>
Reviewed-by: default avatarShik Chen <shik@chromium.org>
Commit-Queue: Shik Chen <shik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#700670}
parent dd7c78fa
......@@ -857,7 +857,8 @@ cca.util.isWindowFullSize = function() {
// App-window's isFullscreen, isMaximized state and window's outer-size may
// not be updated immediately during resizing. Use if app-window's outerBounds
// width matches screen width here as workarounds.
return chrome.app.window.current().outerBounds.width >= screen.width;
return chrome.app.window.current().outerBounds.width >= screen.width ||
chrome.app.window.current().outerBounds.height >= screen.height;
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment