Bug 1452181 [wpt PR 10019] - [LayoutNG] Don't resolve unresolvable percentage min-height and max-height., a=testonly
authorMorten Stenshorne <mstensho@chromium.org>
Mon, 09 Apr 2018 16:46:02 +0000
changeset 467041 aacd2f782b2b40c0f7f11b69d29ba72fb9a55ba7
parent 467040 b54fd13d3ac4eaadd44ad12b346084654cf86158
child 467042 0d0b60ccb9a535b4b450410ce5b4aea480560bd6
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1452181, 10019, 960085, 543018
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 1452181 [wpt PR 10019] - [LayoutNG] Don't resolve unresolvable percentage min-height and max-height., a=testonly Automatic update from web-platform-tests[LayoutNG] Don't resolve unresolvable percentage min-height and max-height. We cannot use the content size (intrinsic block size) as min-height or max-height (min-width or max-width, if writing mode is vertical). Doing so would cause min-height to incorrectly override any specified height or max-height that is less than the intrinsic block size, and max-height to override any specified height that's greater than the intrinsic block size. Do what the spec says [1] instead: max-height to become 'none', and min-height to become 0. This fixes the final rendering problem with Acid2 (this was about the min-height issue). It now renders correctly with LayoutNG! Since no other tests than Acid2 started to pass with this change, I wrote a couple. [1] https://www.w3.org/TR/CSS22/visudet.html#min-max-heights XXXXXX XX XX X X X O O X X X X /\ X X \/ X X X X X X X X XXXXXXXX X X X XX XX XXXXXX Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: Ic4f2c3c1dbc2bd66956ed4b270b08058999bc351 Reviewed-on: https://chromium-review.googlesource.com/960085 Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Aleks Totic <atotic@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/master@{#543018} wpt-commits: 6573773339b47b2e255df1e274788257aa50ad92 wpt-pr: 10019 wpt-commits: 6573773339b47b2e255df1e274788257aa50ad92 wpt-pr: 10019
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/css/CSS2/normal-flow/unresolvable-max-height.html
testing/web-platform/tests/css/CSS2/normal-flow/unresolvable-min-height.html
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -311502,16 +311502,28 @@
     ]
    ],
    "css/CSS2/floats/zero-space-between-floats-004.html": [
     [
      "/css/CSS2/floats/zero-space-between-floats-004.html",
      {}
     ]
    ],
+   "css/CSS2/normal-flow/unresolvable-max-height.html": [
+    [
+     "/css/CSS2/normal-flow/unresolvable-max-height.html",
+     {}
+    ]
+   ],
+   "css/CSS2/normal-flow/unresolvable-min-height.html": [
+    [
+     "/css/CSS2/normal-flow/unresolvable-min-height.html",
+     {}
+    ]
+   ],
    "css/compositing/mix-blend-mode/mix-blend-mode-creates-stacking-context.html": [
     [
      "/css/compositing/mix-blend-mode/mix-blend-mode-creates-stacking-context.html",
      {}
     ]
    ],
    "css/compositing/mix-blend-mode/mix-blend-mode-parsing.html": [
     [
@@ -456623,16 +456635,24 @@
   "css/CSS2/normal-flow/table-in-inline-001-ref.xht": [
    "5d03e5b31d5d7466c0b70fef2ebd95f6bcc92435",
    "support"
   ],
   "css/CSS2/normal-flow/table-in-inline-001.xht": [
    "62aae8605308e22c641111007fdc8709507d021d",
    "reftest"
   ],
+  "css/CSS2/normal-flow/unresolvable-max-height.html": [
+   "66e736acb2edc0bd737807abf4e2ea3e9a16965d",
+   "testharness"
+  ],
+  "css/CSS2/normal-flow/unresolvable-min-height.html": [
+   "02d5f978e4688af271ced6c90956bfc3cc995967",
+   "testharness"
+  ],
   "css/CSS2/normal-flow/width-001.xht": [
    "c43946e15b0dd2a0635f86f7227b112d878f6c17",
    "reftest"
   ],
   "css/CSS2/normal-flow/width-002.xht": [
    "a8be31abfe9866717a07a50e5d57a13ee9abea7c",
    "reftest"
   ],
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/normal-flow/unresolvable-max-height.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<title>Unresolvable percentage min-height</title>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#min-max-heights" title="10.7 Minimum and maximum heights: 'min-height' and 'max-height'">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/check-layout-th.js"></script>
+<div id="container" style="width:100px; height:30000px; max-height:100%;" data-expected-height="30000">
+  <div style="height:12345px;"></div>
+</div>
+<script>
+  checkLayout("#container");
+</script>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/normal-flow/unresolvable-min-height.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<title>Unresolvable percentage min-height</title>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#min-max-heights" title="10.7 Minimum and maximum heights: 'min-height' and 'max-height'">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/check-layout-th.js"></script>
+<p>There should be a blue square below.</p>
+<div id="container" style="width:100px; max-height:100px; min-height:100%; background:blue;" data-expected-height="100">
+  <div style="height:300px;"></div>
+</div>
+<script>
+  checkLayout("#container");
+</script>