Bug 1423013 - Add a web platform test checking documentElement clientWidth is `Initial Containing Block` size even if there is visible overlow:hidden region due to minimum-scale. r=botond
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Tue, 15 Jan 2019 09:47:48 +0000
changeset 511009 8aa60df47b04f3d53d0c243c8a1c2d9cfeaaf6ae
parent 511008 654c9274673479fc772eef2f8a3002982e931a62
child 511010 9d1c137922e113fda75af1aa8eea0859b6fadb69
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbotond
bugs1423013
milestone66.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 1423013 - Add a web platform test checking documentElement clientWidth is `Initial Containing Block` size even if there is visible overlow:hidden region due to minimum-scale. r=botond Differential Revision: https://phabricator.services.mozilla.com/D15344
testing/web-platform/tests/css/css-device-adapt/documentElement-clientWidth-on-minimum-scale-size.tentative.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-device-adapt/documentElement-clientWidth-on-minimum-scale-size.tentative.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset=utf-8>
+<meta name="viewport" content="width=device-width minimum-scale=0.5">
+<link rel="help" href="https://drafts.csswg.org/css-device-adapt/">
+<style>
+html {
+  overflow: hidden;
+}
+body {
+  margin: 0;
+}
+div {
+  height: 200%;
+  position: absolute;
+}
+</style>
+<title></title>
+<div style="width: 200%;"></div>
+<div id="reference" style="width: 100%;"></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+'use strict';
+test(() => {
+  assert_equals(document.documentElement.clientWidth, reference.clientWidth,
+    'documentElement clientWidth should be 100%');
+}, 'documentElement clientWidth should be equal to device-width even if ' +
+   'overflow:hidden region is visible');
+</script>