forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
weblayer: fix bug where controls would show on rotation
onOffsetsChanged() does nothing if fullscreen. This changes the code to call to setControlsOffset() so that the offsets are correctly updated. BUG=1149335 TEST=testTopViewRemainsHiddenOnFullscreenRotation Change-Id: I419f629292caf5f4454a04920c6a9778c8f16731 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2575898 Reviewed-by: Robbie McElrath <rmcelrath@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#834026}
- Loading branch information
Scott Violet
authored and
Chromium LUCI CQ
committed
Dec 5, 2020
1 parent
80fe85e
commit 88b825e
Showing
3 changed files
with
82 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<html> | ||
<body style="height:5000px"> | ||
<p>A page that will rotate on touch.</p> | ||
</body> | ||
<script> | ||
async function toggleFullscreen() { | ||
if (!document.fullscreenElement) { | ||
await document.documentElement.requestFullscreen(); | ||
await screen.orientation.lock("landscape-primary"); | ||
} else { | ||
document.exitFullscreen(); | ||
} | ||
} | ||
document.addEventListener('touchend', function(e) { toggleFullscreen(); }, false); | ||
</script> | ||
</html> |