Update support for other platforms
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Mar 2016 02:40:03 +0000 (02:40 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Mar 2016 02:40:03 +0000 (02:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=155824

Reviewed by Simon Fraser.

* Animometer/resources/debug-runner/animometer.css: Remove extraneous media query. All of it should
be handled in the release stylesheet.
* Animometer/resources/debug-runner/animometer.js: Add support for browsers that return an HTMLCollection
when retrieving radio elements with a name, instead of the selected value.
* Animometer/resources/runner/animometer.css: Adjust the queries for devices of varying widths.
(.frame-container): Move overflow:hidden to #stage.
* Animometer/tests/master/resources/stage.css: Consolidate into tests/resources/stage.css.
* Animometer/tests/resources/stage.css:
(body): Remove overflow:hidden.
(#stage): Set overflow:hidden here.
(#center-text): Moved from master/resources/stage.css.

Update stylesheet hrefs.
* Animometer/tests/master/canvas-stage.html:
* Animometer/tests/master/focus.html:
* Animometer/tests/master/leaves.html:
* Animometer/tests/master/multiply.html:
* Animometer/tests/master/particles.html:
* Animometer/tests/master/text.html: Adjust text size to fit in the device screen.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198611 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
PerformanceTests/Animometer/resources/debug-runner/animometer.css
PerformanceTests/Animometer/resources/debug-runner/animometer.js
PerformanceTests/Animometer/resources/runner/animometer.css
PerformanceTests/Animometer/tests/master/canvas-stage.html
PerformanceTests/Animometer/tests/master/focus.html
PerformanceTests/Animometer/tests/master/leaves.html
PerformanceTests/Animometer/tests/master/multiply.html
PerformanceTests/Animometer/tests/master/particles.html
PerformanceTests/Animometer/tests/master/resources/stage.css [deleted file]
PerformanceTests/Animometer/tests/master/text.html
PerformanceTests/Animometer/tests/resources/stage.css
PerformanceTests/ChangeLog

index 0d8788b..ac0d172 100644 (file)
@@ -290,13 +290,6 @@ label.tree-label {
     background-color: rgb(235, 96, 32);
 }
 
-@media screen and (min-device-width: 1800px) {
-    .frame-container > iframe {
-        width: 1600px;
-        height: 800px;
-    }
-}
-
 /* -------------------------------------------------------------------------- */
 /*                           Results Section                                  */
 /* -------------------------------------------------------------------------- */
index 6b07c50..8430b84 100644 (file)
@@ -142,6 +142,14 @@ window.optionsManager =
         var formElement = document.forms["benchmark-options"].elements[name];
         if (formElement.type == "checkbox")
             return formElement.checked;
+        else if (formElement.constructor === HTMLCollection) {
+            for (var i = 0; i < formElement.length; ++i) {
+                var radio = formElement[i];
+                if (radio.checked)
+                    return formElement.value;
+            }
+            return null;
+        }
         return formElement.value;
     },
 
@@ -181,8 +189,19 @@ window.optionsManager =
                 options[name] = +formElement.value;
             else if (type == "checkbox")
                 options[name] = formElement.checked;
-            else if (type == "radio")
-                options[name] = formElements[name].value;
+            else if (type == "radio") {
+                var radios = formElements[name];
+                if (radios.constructor === HTMLCollection) {
+                    for (var j = 0; j < radios.length; ++j) {
+                        var radio = radios[j];
+                        if (radio.checked) {
+                            options[name] = radio.value;
+                            break;
+                        }
+                    }
+                } else
+                    options[name] = formElements[name].value;
+            }
 
             try {
                 localStorage.setItem(name, options[name]);
index 9f1873d..eefbd25 100644 (file)
@@ -173,13 +173,6 @@ button:disabled {
     margin: 0 auto;
 }
 
-@media screen and (min-device-width: 1800px) {
-    .frame-container > iframe {
-        width: 1600px;
-        height: 800px;
-    }
-}
-
 @media screen and (max-device-width: 414px) {
     #test-container {
         padding: 0;
@@ -188,7 +181,6 @@ button:disabled {
     .frame-container {
         width: 100%;
         height: 100%;
-        overflow: hidden;
     }
 
     .frame-container > iframe {
@@ -197,9 +189,24 @@ button:disabled {
     }
 }
 
-@media screen and (max-device-width: 1024px) {
+@media screen and (min-device-width: 768px) and (max-device-width: 1024px) {
     .frame-container > iframe {
         width: 900px;
+        height: 600px;
+    }
+}
+
+@media screen and (min-device-width: 1024px) and (max-device-width: 1366px) {
+    .frame-container > iframe {
+        width: 1200px;
+        height: 800px;
+    }
+}
+
+@media screen and (min-width: 1800px) {
+    .frame-container > iframe {
+        width: 1600px;
+        height: 800px;
     }
 }
 
index 123c4bc..f86cb44 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
     <meta charset="utf-8">
-    <link rel="stylesheet" type="text/css" href="resources/stage.css">
+    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
 </head>
 <body>
     <canvas id="stage"></canvas>
index e4b2f80..72a8533 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
     <meta charset="utf-8">
-    <link rel="stylesheet" type="text/css" href="resources/stage.css">
+    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
     <style type="text/css">
 
     #stage {
index 0ba8467..ada0540 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
     <meta charset="utf-8">
-    <link rel="stylesheet" type="text/css" href="resources/stage.css">
+    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
     <style>
         #stage {
             background-color: #23282B;
index 7e7f07b..7ddc1ef 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
     <meta charset="utf-8">
-    <link rel="stylesheet" type="text/css" href="resources/stage.css">
+    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
     <style type="text/css">
 
     #stage {
index 8de065e..94f2836 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
     <meta charset="utf-8">
-    <link rel="stylesheet" type="text/css" href="resources/stage.css">
+    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
     <style>
         #stage div {
             position: absolute;
diff --git a/PerformanceTests/Animometer/tests/master/resources/stage.css b/PerformanceTests/Animometer/tests/master/resources/stage.css
deleted file mode 100644 (file)
index 853578b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-html {
-    height: 100%;
-}
-body {
-    width: 100%;
-    height: 100%;
-    overflow: hidden;
-    margin: 0;
-    padding: 0;
-    background-color: rgb(241, 241, 241);
-    font-family: -apple-system, "Helvetica Neue", Helvetica, Verdana, sans-serif;
-}
-
-#stage {
-    position: relative;
-    width: 100%;
-    height: 100%;
-    background-color: rgb(241, 241, 241);
-}
-
-#center-text {
-    position: absolute;
-    z-index: 3;
-    top: 50%;
-    left: 50%;
-    transform: translateX(-50%) translateY(-50%);
-}
\ No newline at end of file
index 02b516a..8e0a207 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
     <meta charset="utf-8">
-    <link rel="stylesheet" type="text/css" href="resources/stage.css">
+    <link rel="stylesheet" type="text/css" href="../resources/stage.css">
     <style type="text/css">
 
         #stage {
             font-size: 48px;
             background-color: #313534;/* #d1948c;*/
         }
+        @media screen and (max-device-width: 414px) {
+            #stage {
+                font-size: 36px;
+            }
+        }
+        @media screen and (max-device-width: 320px) {
+            #stage {
+                font-size: 24px;
+            }
+        }
+
         #stage div {
             width: 80%;
             height: 90%;
index 90e31bb..edf7141 100644 (file)
@@ -4,14 +4,24 @@ html {
 body {
     width: 100%;
     height: 100%;
-    overflow: hidden;
     margin: 0;
     padding: 0;
-    background-color: #eaeaea;
+    background-color: rgb(241, 241, 241);
+    font-family: -apple-system, "Helvetica Neue", Helvetica, Verdana, sans-serif;
 }
 
 #stage {
-  width: 100%;
-  height: 100%;
-  background-color: #eaeaea;
+    position: relative;
+    width: 100%;
+    height: 100%;
+    background-color: rgb(241, 241, 241);
+    overflow: hidden;
+}
+
+#center-text {
+    position: absolute;
+    z-index: 3;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
 }
index 82cc0a4..5bdcde7 100644 (file)
@@ -1,5 +1,32 @@
 2016-03-23  Jon Lee  <jonlee@apple.com>
 
+        Update support for other platforms
+        https://bugs.webkit.org/show_bug.cgi?id=155824
+
+        Reviewed by Simon Fraser.
+
+        * Animometer/resources/debug-runner/animometer.css: Remove extraneous media query. All of it should
+        be handled in the release stylesheet.
+        * Animometer/resources/debug-runner/animometer.js: Add support for browsers that return an HTMLCollection
+        when retrieving radio elements with a name, instead of the selected value.
+        * Animometer/resources/runner/animometer.css: Adjust the queries for devices of varying widths.
+        (.frame-container): Move overflow:hidden to #stage.
+        * Animometer/tests/master/resources/stage.css: Consolidate into tests/resources/stage.css.
+        * Animometer/tests/resources/stage.css:
+        (body): Remove overflow:hidden.
+        (#stage): Set overflow:hidden here.
+        (#center-text): Moved from master/resources/stage.css.
+
+        Update stylesheet hrefs.
+        * Animometer/tests/master/canvas-stage.html:
+        * Animometer/tests/master/focus.html:
+        * Animometer/tests/master/leaves.html:
+        * Animometer/tests/master/multiply.html:
+        * Animometer/tests/master/particles.html:
+        * Animometer/tests/master/text.html: Adjust text size to fit in the device screen.
+
+2016-03-23  Jon Lee  <jonlee@apple.com>
+
         Make the benchmark require device to be in landscape orientation
         https://bugs.webkit.org/show_bug.cgi?id=155822
         rdar://problem/25258650