Bug 1497376 [wpt PR 13427] - [LayoutNG] Auto top/bottom margins may resolve to negative values., a=testonly
authorMorten Stenshorne <mstensho@chromium.org>
Thu, 11 Oct 2018 10:03:46 +0000
changeset 441062 0d8a90abecca5e3fbf461b84613638ef44f046eb
parent 441061 c9aa878bc340c79168647e27e1f08468c5dcbef8
child 441063 17db37b424452e5444426bf5c3b178efe9762182
push id34842
push useraciure@mozilla.com
push dateSat, 13 Oct 2018 09:36:47 +0000
treeherdermozilla-central@94a62c1aad52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1497376, 13427, 888270, 1269855, 598052
milestone64.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 1497376 [wpt PR 13427] - [LayoutNG] Auto top/bottom margins may resolve to negative values., a=testonly Automatic update from web-platform-tests[LayoutNG] Auto top/bottom margins may resolve to negative values. The spec doesn't say that auto margin-top or margin-bottom need to resolve to something non-negative, so just allow negative values as well. They don't cause over-constrainedness. Also, when distributing the space to margin-top and margin-bottom, make sure that everything gets distributed. Set margin-top to the half, and set margin-bottom to total space MINUS margin-top. Just dividing both by two might cause us to lose a tiny fraction of the total, due to rounding. Bug: 888270 Cq-Include-Trybots: luci.chromium.try‚Äč:linux_layout_tests_layout_ng Change-Id: Ia10577851e60707a0e2d67857a1c43a12e28b9d2 Reviewed-on: https://chromium-review.googlesource.com/c/1269855 Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Reviewed-by: Emil A Eklund <eae@chromium.org> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Reviewed-by: Aleks Totic <atotic@chromium.org> Cr-Commit-Position: refs/heads/master@{#598052} -- wpt-commits: 600cd3587280c06908d7a32918fc87792ce91a03 wpt-pr: 13427
testing/web-platform/tests/css/CSS2/positioning/absolute-non-replaced-height-013.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/CSS2/positioning/absolute-non-replaced-height-013.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<title>Auto margin-top and margin-bottom, non-auto everything else</title>
+<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
+<link rel="help" href="https://www.w3.org/TR/CSS22/visudet.html#abs-non-replaced-height">
+<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div style="position:relative; width:100px; height:100px; background:red;">
+  <div style="position:absolute; top:50%; bottom:50%; width:100px; height:100px; margin:auto; background:green;"></div>
+</div>