Bug 1457956 [wpt PR 10714] - [css-tables] Scrollbar should be removed from OverrideLogicalHeight(), a=testonly
authorManuel Rego Casasnovas <rego@igalia.com>
Tue, 01 May 2018 17:22:06 +0000
changeset 472721 78af959b8dbc43881f5fbb0ac50474ef03c9490a
parent 472720 c05c54159d8ef76965f6928645d801358700b206
child 472722 437b381bc3adf8c1e98dc8cb8a3f1f1feaf8ef74
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1457956, 10714, 838144, 1035125, 554853
milestone61.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 1457956 [wpt PR 10714] - [css-tables] Scrollbar should be removed from OverrideLogicalHeight(), a=testonly Automatic update from web-platform-tests[css-tables] Scrollbar should be removed from OverrideLogicalHeight() When computing the percentage height of table cell replaced children, if the table cell has horizontal scrollbar we have to subtract its height from the OverrideLogicalHeight(). The patch is just following a suggestion from a TODO in LayoutBox::AvailableLogicalHeightUsing(). BUG=838144 TEST=external/wpt/css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001.html Change-Id: I21f33b82978ffaeb7a6f04eb49ef2e1a52c1e8c0 Reviewed-on: https://chromium-review.googlesource.com/1035125 Reviewed-by: Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Manuel Rego Casasnovas <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#554853} -- wpt-commits: 621c98d70bc30cae3319aef809c98929420c0f06 wpt-pr: 10714
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001-ref.html
testing/web-platform/tests/css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -128222,16 +128222,28 @@
       [
        "/css/css-tables/height-distribution/percentage-sizing-of-table-cell-children-002-ref.html",
        "=="
       ]
      ],
      {}
     ]
    ],
+   "css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001.html": [
+    [
+     "/css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001.html",
+     [
+      [
+       "/css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001-ref.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-tables/height-distribution/td-different-subpixel-padding-in-same-row-vertical-rl.html": [
     [
      "/css/css-tables/height-distribution/td-different-subpixel-padding-in-same-row-vertical-rl.html",
      [
       [
        "/css/css-tables/height-distribution/td-different-subpixel-padding-in-same-row-vertical-rl-ref.html",
        "=="
       ]
@@ -254328,16 +254340,21 @@
      {}
     ]
    ],
    "css/css-tables/height-distribution/percentage-sizing-of-table-cell-children-002-ref.html": [
     [
      {}
     ]
    ],
+   "css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001-ref.html": [
+    [
+     {}
+    ]
+   ],
    "css/css-tables/height-distribution/td-different-subpixel-padding-in-same-row-ref.html": [
     [
      {}
     ]
    ],
    "css/css-tables/height-distribution/td-different-subpixel-padding-in-same-row-vertical-rl-ref.html": [
     [
      {}
@@ -516628,16 +516645,24 @@
   "css/css-tables/height-distribution/percentage-sizing-of-table-cell-children-002.html": [
    "b8a7f312ff67da23ed7fc212b27f78ae712eec21",
    "reftest"
   ],
   "css/css-tables/height-distribution/percentage-sizing-of-table-cell-children.html": [
    "55a759d84f38e6adf0f091c9c0ecaa69060cb51a",
    "testharness"
   ],
+  "css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001-ref.html": [
+   "44b8eefa18e5c99f034b997c40a5245d5b8d8497",
+   "support"
+  ],
+  "css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001.html": [
+   "9f50c6aacca1d1c5a8ad5814b92566aae707cebd",
+   "reftest"
+  ],
   "css/css-tables/height-distribution/td-different-subpixel-padding-in-same-row-ref.html": [
    "2bb8a26451a23ebcf548ad147d301ea5d9603c25",
    "support"
   ],
   "css/css-tables/height-distribution/td-different-subpixel-padding-in-same-row-vertical-rl-ref.html": [
    "bfb2b402c1887841f89fc7954a2cccacd3babab6",
    "support"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001-ref.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Reftest Reference: Percentage sizing of table cell children with margin, border, padding and scrollbar</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<style>
+.table {
+  display: block;
+  border: solid 5px black;
+  width: 150px;
+  height: 100px;
+}
+
+.td {
+  background: cyan;
+  overflow: scroll;
+  padding: 5px 15px 10px 20px;
+  border: solid magenta;
+  border-width: 12px 9px 6px 3px;
+  height: 100px;
+  box-sizing: border-box;
+}
+
+img {
+  display: block;
+  background: yellow;
+  width: 100%;
+  height: 100%;
+}
+</style>
+
+<p>The test passes if you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
+
+<div class="table">
+  <div class="td">
+    <img />
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-tables/height-distribution/percentage-sizing-of-table-cell-replaced-children-001.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Table Test: Percentage sizing of table cell replaced children with margin, border, padding and scrollbar</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-tables-3/#content-measure">
+<link rel="match" href="percentage-sizing-of-table-cell-replaced-children-001-ref.html">
+<meta name="assert" content="Checks that table cell replaced children resolve properly their percentage sizes, even when the table cell has margin, border, padding and scrollbar.">
+<style>
+.table {
+  display: table;
+  border: solid 5px black;
+  width: 150px;
+  height: 100px;
+}
+
+.td {
+  display: table-cell;
+  background: cyan;
+  overflow: scroll;
+  margin: 1px 2px 3px 4px;
+  padding: 5px 15px 10px 20px;
+  border: solid magenta;
+  border-width: 12px 9px 6px 3px;
+}
+
+img {
+  display: block;
+  background: yellow;
+  width: 100%;
+  height: 100%;
+}
+</style>
+
+<p>The test passes if you see scrollbars but there's no overflow, so you cannot actually scroll.</p>
+
+<div class="table">
+  <div class="td">
+    <img />
+  </div>
+</div>