[TablesNG] Fix HTML display:table width

The only tricky part was figuring out if layout object is
an HTML element.

Bug: 1193232
Change-Id: I33db11874f445d08084404bcba8821b143b5b1dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2793523
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#867766}
diff --git a/css/css-tables/html-display-table.html b/css/css-tables/html-display-table.html
new file mode 100644
index 0000000..20d2603
--- /dev/null
+++ b/css/css-tables/html-display-table.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html style="margin:0;padding:0">
+<title>&lt;html display:table&gt;</title>
+<link rel="author" href="mailto:atotic@chromium.org">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<link rel="help" href="https://www.w3.org/TR/css-overflow-3/#scrollable">
+<meta name="assert" content="<html display:table> does not fill the viewport">
+<style>
+  html {
+    display: table;
+    border: 10px solid green;
+    border-spacing: 0;
+    padding: 0;
+    margin: 0;
+  }
+  body {
+    padding: 0;
+    margin: 0;
+  }
+</style>
+<div style="width:200px;height:300px;background:yellow;display:inline-block;"></div><div style="width:80px;height:300px;background:yellow;display:inline-block;"></div>
+<script>
+  test( _=> {
+    assert_equals(document.querySelector("html").offsetWidth, 300);
+  }, "<html display:table> width is table's max width");
+</script>