commit | 05cec5c6fd7ee28f9917e788a9e0708fa1940a5b | [log] [tgz] |
---|---|---|
author | Eliot Courtney <edcourtney@google.com> | Thu Nov 01 05:34:12 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Nov 01 05:34:12 2018 |
tree | fb78f4f944d390dbcddbb69e7b78a87dcbe0295a | |
parent | d2469282ca473a740fc36e4da4187cc19a1908dd [diff] |
Move the PIP window out of the way of the floating keyboard and tray. We are looking for the minimum displacement of the PIP window that makes it not intersect any system trays or the floating keyboard. There are four cases for how the PIP window could move. Case #1: Touches 0 obstacles. This corresponds to not moving. Case #2: Touches 1 obstacle. The PIP window will be touching one edge of the obstacle. Case #3: Touches 2 obstacles. The PIP window will be touching one horizontal and one vertical edge from two different obstacles. Case #4: Touches more than 2 obstacles. This is handled in case #3. To handle all these cases, we just need to check a few candidate points. If the PIP window is displaced by one obstacle, the shortest displacement is to move along the horizontal or vertical axis to be directly adjacent to one of the edges of that obstacle. If it is displaced by two obstacles, the shortest displacement is to move to be directly adjacent to a horizontal and vertical edge - one from each obstacle. keyboard and unified system tray update, and the PIP window moved out of the way of both the floating virtual keyboard and unified system tray. Bug: 883118 Bug: 841886 Bug: b/115291749 Test: Added unittest Test: Patched in code calling GetPositionAfterMovementAreaChange on Change-Id: I2b500d5ba4a67fe2e309b809ec667248a19518ca Reviewed-on: https://chromium-review.googlesource.com/c/1221427 Commit-Queue: Eliot Courtney <edcourtney@chromium.org> Reviewed-by: Mitsuru Oshima <oshima@chromium.org> Cr-Commit-Position: refs/heads/master@{#604523}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .