Skip to content

Commit

Permalink
Bug 1485756 [wpt PR 12652] - Fullscreen elements that were root level…
Browse files Browse the repository at this point in the history
… elements weren't sized properly., a=testonly

Automatic update from web-platform-testsFullscreen elements that were root level elements weren't sized properly.

Avoid setting position absolute on top layer elements that are the
documentElement. This matches what Firefox does.

The root element is special when it is in fullscreen mode because it does
not get the style applied that forces its dimensions and position to be
fixed.

BUG=876339

Change-Id: I42b18047dc9648585bc279510d66decd6d6a4516
Reviewed-on: https://chromium-review.googlesource.com/1186961
Commit-Queue: Dave Tapuska <[email protected]>
Reviewed-by: Rune Lillesveen <[email protected]>
Cr-Commit-Position: refs/heads/master@{#585830}

--

wpt-commits: 3588ed998f005477df1060cdee0560b9e47c8509
wpt-pr: 12652
  • Loading branch information
dtapuska authored and moz-wptsync-bot committed Aug 31, 2018
1 parent 7fadbd0 commit 5e04d79
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
10 changes: 10 additions & 0 deletions testing/web-platform/meta/MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -11503,6 +11503,12 @@
{}
]
],
"fullscreen/rendering/fullscreen-root-block-size-manual.html": [
[
"/fullscreen/rendering/fullscreen-root-block-size-manual.html",
{}
]
],
"fullscreen/rendering/ua-style-iframe-manual.html": [
[
"/fullscreen/rendering/ua-style-iframe-manual.html",
Expand Down Expand Up @@ -589219,6 +589225,10 @@
"ccd3f0e22be91def3e2117a567c4245a7fea5720",
"support"
],
"fullscreen/rendering/fullscreen-root-block-size-manual.html": [
"989a85d91c4e17c6f5fd307d2fcfc810c3246738",
"manual"
],
"fullscreen/rendering/ua-style-iframe-manual.html": [
"bf93aa28c3f10e65cf975f5a14833eff7b9ee688",
"manual"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<style>
html, body {
margin: 0px;
}
</style>
<title>fullscreen root block sizing</title>
<!-- This page intentionally has no content. It needs to have
no width or height. This is to ensure that the root element
gets sizing in fullscreen mode as it does in as it does not
in fullscreen mode.
-->
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script>
async_test(t => {
document.onfullscreenchange = t.step_func_done(() => {
assert_equals(document.fullscreenElement, document.documentElement);
assert_true(document.documentElement.getBoundingClientRect().width > 0);
});
document.documentElement.addEventListener('click', e => {
document.documentElement.requestFullscreen();
}, {once: true});
test_driver.click(document.documentElement);
});
</script>

0 comments on commit 5e04d79

Please sign in to comment.