-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pip-pinch: Disallow offscreen bounds during resist
The resistance effect (b/298282501) uses `gfx::Transform.Scale()` to visually change the size of the window, but it only changes the visual screen size and the window's actual bounds are not scaled with the transform. The bounds correction that keeps the PiP window inside the screen uses the bounds to calculate the obstacle avoidance, so the PiP window was allowed to momentarily go partially offscreen during the effect. This commit adds new `PipPositioner::GetBoundsForDrag` that takes `gfx::Transform` as an argument and returns the bounds that avoids the obstacles even with the scale effect applied. during the resistance effect. Bug: b/303150761 Test: Manually confirmed that the window does not go out of bounds even Change-Id: Ic125f38ba0262007c0a2a4e3cafdef3a92517e97 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4923231 Reviewed-by: Kazuki Takise <takise@chromium.org> Commit-Queue: Masa Fujita <massan@google.com> Auto-Submit: Masa Fujita <massan@google.com> Cr-Commit-Position: refs/heads/main@{#1210057}
- Loading branch information
Masayuki Fujita
authored and
Chromium LUCI CQ
committed
Oct 16, 2023
1 parent
66bfd97
commit a7f4aca
Showing
6 changed files
with
160 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.