Bug 1573696 [wpt PR 18409] - Implement CSS comparison functions min/max, a=testonly
authorXiaocheng Hu <xiaochengh@chromium.org>
Mon, 19 Aug 2019 14:27:15 +0000
changeset 553471 3addeacf6c5b9afd1863b22ce3b50772559c24e7
parent 553470 b5cfa1ab961a7fe00ac30f5886bf1dc217663bc8
child 553472 17b27d0f744e1e279bb29bfd59f5fffc53a8e3a9
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1573696, 18409, 825895, 1744799, 687414
milestone70.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 1573696 [wpt PR 18409] - Implement CSS comparison functions min/max, a=testonly Automatic update from web-platform-tests Implement CSS comparison functions min/max This patch implements the CSSComparison functions min/max following spec: https://drafts.csswg.org/css-values-4/#comp-func 1. New CSSMathOperator types and a new CSSMathExpressionNode subclass are added, so that CSSMathFunctionValue can represent an expression that involves min() and max() 2. Parser support for min() and max() are added 3. Conversions between CSSMathFunctionValue and CalculationValue are augmented to support comparisons A minimal test suite is also added to verify reachability of the newly added code. The following will be finished by future patches: - Bridging comparison functions with CSS typed OM objects - Supporting comparison functions in the 'sizes' attribute - Adding a comprehensive wpt test suite for comparison functions Bug: 825895 Change-Id: I5bbf09b62818f733573f6d38837c68e555fcae59 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1744799 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#687414} -- wpt-commits: 38f7044a30c6ff3ee5e41a0b7c6773f302b19576 wpt-pr: 18409
testing/web-platform/tests/css/css-values/max-length-percent-001.html
testing/web-platform/tests/css/css-values/min-length-percent-001.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-values/max-length-percent-001.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS values: max() between pixel and percentage values</title>
+<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
+<link rel="match" href="reference/200-200-green.html">
+<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
+<style>
+html, body { margin: 0px; padding: 0px; }
+#parent { width: 400px; }
+#target {
+  width: max(100px, 25% + 100px, 150px + 10%);
+  height: 200px;
+  background: green;
+}
+</style>
+<div id=parent>
+  <div id=target></div>
+</div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-values/min-length-percent-001.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS values: min() between pixel and percentage values</title>
+<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
+<link rel="match" href="reference/200-200-green.html">
+<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
+<style>
+html, body { margin: 0px; padding: 0px; }
+#parent { width: 400px; }
+#target {
+  width: min(300px, 25% + 100px, 50px + 50%);
+  height: 200px;
+  background: green;
+}
+</style>
+<div id=parent>
+  <div id=target></div>
+</div>