Bug 1485756 [wpt PR 12652] - Fullscreen elements that were root level elements weren't sized properly., a=testonly
authorDave Tapuska <dtapuska@chromium.org>
Wed, 29 Aug 2018 22:38:11 +0000
changeset 492026 a21736ae8e95cb98a1a8a158123696731aca8e00
parent 492025 9c9ed71906761537f9ba8378d89072c24f15d4fe
child 492027 a496daf666ea48b0fa47d87702e6d3c021d95925
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1485756, 12652, 876339, 1186961, 585830
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1485756 [wpt PR 12652] - Fullscreen elements that were root level 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 <dtapuska@chromium.org> Reviewed-by: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#585830} -- wpt-commits: 3588ed998f005477df1060cdee0560b9e47c8509 wpt-pr: 12652
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/fullscreen/rendering/fullscreen-root-block-size-manual.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -11498,16 +11498,22 @@
     ]
    ],
    "fullscreen/rendering/fullscreen-pseudo-class-manual.html": [
     [
      "/fullscreen/rendering/fullscreen-pseudo-class-manual.html",
      {}
     ]
    ],
+   "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",
      {}
     ]
    ],
    "gamepad/events-manual.html": [
     [
@@ -589214,16 +589220,20 @@
   "fullscreen/rendering/fullscreen-pseudo-class-manual.html": [
    "0c06ba3c6df7d23a7c47de24411279d6401a1307",
    "manual"
   ],
   "fullscreen/rendering/fullscreen-pseudo-class-support.html": [
    "ccd3f0e22be91def3e2117a567c4245a7fea5720",
    "support"
   ],
+  "fullscreen/rendering/fullscreen-root-block-size-manual.html": [
+   "989a85d91c4e17c6f5fd307d2fcfc810c3246738",
+   "manual"
+  ],
   "fullscreen/rendering/ua-style-iframe-manual.html": [
    "bf93aa28c3f10e65cf975f5a14833eff7b9ee688",
    "manual"
   ],
   "fullscreen/trusted-click.js": [
    "7ee0669eece3e341ef76da4dd153e5ec05ccb288",
    "support"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/fullscreen/rendering/fullscreen-root-block-size-manual.html
@@ -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>