Bug 1465361 [wpt PR 11244] - [Squad] Use UA styling for form inside table elements., a=testonly
authorRune Lillesveen <futhark@chromium.org>
Wed, 06 Jun 2018 16:46:57 +0000
changeset 476438 78810c2adfbf38d821711a8af53820e6c4ab68cb
parent 476437 fb3095f9f93e1412d95cc803d3e133fae355c67e
child 476439 b029276297d9401f69f93c6ecd6cbc0c7adc59f3
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1465361, 11244, 847763, 843520, 1078348, 562789
milestone62.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 1465361 [wpt PR 11244] - [Squad] Use UA styling for form inside table elements., a=testonly Automatic update from web-platform-tests[Squad] Use UA styling for form inside table elements. We did not implement UA style as specified for form elements inside table elements. This CL removes the hardcoded way of not creating layout objects and instead add display:none to the UA style sheet as specified. We introduce a new internal pseudo class :-internal-is-html because the rule should only apply in html documents. This is also what Gecko does with its :-moz-is-html. The pseudo class is only allowed in UA sheets. The relationship with Squad is that we get rid of the dependency on ancestor layout objects in LayoutObjectIsNeeded. Bug: 847763, 843520 Change-Id: Ibc83b78493843b1a0503fbb65e509090fe295313 Reviewed-on: https://chromium-review.googlesource.com/1078348 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#562789} -- wpt-commits: 2008aa1e26231e627f94c167c2d4498975276198 wpt-pr: 11244
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/html/rendering/non-replaced-elements/tables/form-in-tables.html
testing/web-platform/tests/html/rendering/non-replaced-elements/tables/form-in-tables.xhtml
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -334700,16 +334700,28 @@
     ]
    ],
    "html/rendering/non-replaced-elements/margin-collapsing-quirks/multicol-standards-mode.html": [
     [
      "/html/rendering/non-replaced-elements/margin-collapsing-quirks/multicol-standards-mode.html",
      {}
     ]
    ],
+   "html/rendering/non-replaced-elements/tables/form-in-tables.html": [
+    [
+     "/html/rendering/non-replaced-elements/tables/form-in-tables.html",
+     {}
+    ]
+   ],
+   "html/rendering/non-replaced-elements/tables/form-in-tables.xhtml": [
+    [
+     "/html/rendering/non-replaced-elements/tables/form-in-tables.xhtml",
+     {}
+    ]
+   ],
    "html/rendering/non-replaced-elements/tables/table-vspace-hspace-s.html": [
     [
      "/html/rendering/non-replaced-elements/tables/table-vspace-hspace-s.html",
      {}
     ]
    ],
    "html/rendering/non-replaced-elements/tables/table-vspace-hspace.html": [
     [
@@ -570993,16 +571005,24 @@
   "html/rendering/non-replaced-elements/tables/colgroup_valign_bottom.xhtml": [
    "c8a7f0b90852bed631ae6c86992566c403cc1ba8",
    "reftest"
   ],
   "html/rendering/non-replaced-elements/tables/colgroup_valign_top.xhtml": [
    "1732dc6dd595354e21c7fb6006c32b844ceedf18",
    "reftest"
   ],
+  "html/rendering/non-replaced-elements/tables/form-in-tables.html": [
+   "8319c136723513a019d48f66c663ce3673777bcd",
+   "testharness"
+  ],
+  "html/rendering/non-replaced-elements/tables/form-in-tables.xhtml": [
+   "610932708cb18b8022ca64b8c9f3f59d8cf1ae56",
+   "testharness"
+  ],
   "html/rendering/non-replaced-elements/tables/table-border-1-ref.html": [
    "1f3aa494ba434211a8cdcd1be289e702856fa05a",
    "support"
   ],
   "html/rendering/non-replaced-elements/tables/table-border-1.html": [
    "17a35d8b06ed08ba39c9fcc3abf7566941ee0c6a",
    "reftest"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/rendering/non-replaced-elements/tables/form-in-tables.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<title>UA style for form in table elements</title>
+<link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#tables-2">
+<link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+  .block { display: block !important }
+</style>
+<div id="display">
+  <table><form></form></table>
+  <table><thead><form></form></thead></table>
+  <table><tbody><form></form></tbody></table>
+  <table><tfoot><form></form></tfoot></table>
+  <table><tr><form></form></tr></table>
+</div>
+<div id="important">
+  <table><form class="block"></form></table>
+  <table><thead><form class="block"></form></thead></table>
+  <table><tbody><form class="block"></form></tbody></table>
+  <table><tfoot><form class="block"></form></tfoot></table>
+  <table><tr><form class="block"></form></tr></table>
+</div>
+<script>
+  for (const form of display.querySelectorAll("form")) {
+    test(function() {
+      assert_equals(getComputedStyle(form).display, "none");
+    }, `Computed display of form inside ${form.parentNode.nodeName} should be 'none'`);
+  }
+  for (const form of important.querySelectorAll("form")) {
+    test(function() {
+      assert_equals(getComputedStyle(form).display, "none");
+    }, `Computed display of form inside ${form.parentNode.nodeName} should be 'none' (!important UA style))`);
+  }
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/html/rendering/non-replaced-elements/tables/form-in-tables.xhtml
@@ -0,0 +1,23 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>UA style for form in table elements - XHTML</title>
+    <link rel="help" href="https://html.spec.whatwg.org/multipage/rendering.html#tables-2" />
+    <link rel="author" title="Rune Lillesveen" href="mailto:futhark@chromium.org" />
+    <script src="/resources/testharness.js"></script>
+    <script src="/resources/testharnessreport.js"></script>
+  </head>
+  <body>
+    <table><form></form></table>
+    <table><thead><form></form></thead></table>
+    <table><tbody><form></form></tbody></table>
+    <table><tfoot><form></form></tfoot></table>
+    <table><tr><form></form></tr></table>
+    <script>
+      for (const form of document.querySelectorAll("form")) {
+        test(function() {
+          assert_equals(getComputedStyle(form).display, "block");
+        }, `Computed display of form inside ${form.parentNode.nodeName} in xhtml should be 'block'`);
+      }
+    </script>
+  </body>
+</html>