Add atan2() function for CSSTrigonometrcFunctions

According to the CSS Values and Units Module Level 4 [1],
the trigonometric function should be parsed and evaluated.

This CL adds atan2() function and testcases for atan2().

Due to the webkit browser resolving <relative length> fallback into DoubleValue, chromium chooses the same logic.
We will gradually implement it for the relative length,
CSSTypedOM, ..etc after releasing the very first version of
trig-functions.

Feature status: [2]
Intent to prototype: [3]
Relative length issue on webkit: [4]

[1] https://www.w3.org/TR/css-values-4/#trig-funcs
[2] https://chromestatus.com/feature/5165381072191488
[3] https://groups.google.com/a/chromium.org/g/blink-dev/c/-c9p-Sq_gWg
[4] https://bugs.webkit.org/show_bug.cgi?id=248513

Bug: 1190444
Change-Id: Ia112bf7b9c8ad1223e80a784d45d1a2e9f48ef54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4004379
Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org>
Commit-Queue: Seokho Song <seokho@chromium.org>
Reviewed-by: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1077723}
diff --git a/css/css-values/acos-asin-atan-atan2-invalid.html b/css/css-values/acos-asin-atan-atan2-invalid.html
index a6d5d0a..2f94c49 100644
--- a/css/css-values/acos-asin-atan-atan2-invalid.html
+++ b/css/css-values/acos-asin-atan-atan2-invalid.html
@@ -67,10 +67,6 @@
 test_invalid_angle('atan2(1deg 2deg)');
 test_invalid_angle('atan2(1deg, , 2deg)');
 test_invalid_angle('atan2(90px)');
-
-// atan2() has to resolve to the same dimension.
-test_invalid_angle('atan2(90px, 90vw)');
-test_invalid_angle('atan2(90px, 90em)');
 test_invalid_angle('atan2(90px, 100%)');
 
 test_invalid_angle('atan2(30deg + 1.0471967rad, 0)');
diff --git a/css/css-values/acos-asin-atan-atan2-serialize.html b/css/css-values/acos-asin-atan-atan2-serialize.html
index 27c0a4f..c867f34 100644
--- a/css/css-values/acos-asin-atan-atan2-serialize.html
+++ b/css/css-values/acos-asin-atan-atan2-serialize.html
@@ -46,6 +46,15 @@
     "atan(infinity)"                                    :"calc(90deg)",
     "atan(tan(90deg))"                                  :"calc(90deg)",
     "atan(tan(-90deg))"                                 :"calc(-90deg)",
+    "atan2(37.320508075, 10)"                           :"calc(75deg)",
+    "atan2(1s, 1000ms)"                                 :"calc(45deg)",
+    "atan2(infinity, infinity)"                         :"calc(45deg)",
+    "atan2(-infinity, -infinity)"                       :"calc(-135deg)",
+    "atan2(infinity, 10)"                               :"calc(90deg)",
+    "atan2(10, infinity)"                               :"calc(0deg)",
+    "atan2(NaN, 10)"                                    :"calc(NaN * 1deg)",
+    "atan2(10, NaN)"                                    :"calc(NaN * 1deg)",
+    "atan2(NaN, NaN)"                                   :"calc(NaN * 1deg)",
 };
 
 for (var exp in test_map) {