[CSS Regions] Minor fixes in regions performance tests
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jan 2014 22:22:13 +0000 (22:22 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jan 2014 22:22:13 +0000 (22:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=127041

Reviewed by Ryosuke Niwa.

Fix minor issues in CSS Regions performance tests.

* Layout/RegionsAuto.html: Change type to lower case.
* Layout/RegionsAutoMaxHeight.html: Ditto.
* Layout/RegionsFixed.html: Ditto.
* Layout/RegionsFixedShort.html: Ditto.
* Layout/RegionsSelection.html: Ditto. Move test methods from regions.js.
* Layout/resources/regions.js: Remove moved methods.

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

PerformanceTests/ChangeLog
PerformanceTests/Layout/RegionsAuto.html
PerformanceTests/Layout/RegionsAutoMaxHeight.html
PerformanceTests/Layout/RegionsFixed.html
PerformanceTests/Layout/RegionsFixedShort.html
PerformanceTests/Layout/RegionsSelection.html
PerformanceTests/Layout/resources/regions.js

index 7695ef50d187a03d92591fec4a130882dbe388a5..7229d166b9a7c100a3652d3803def975741109ab 100644 (file)
@@ -1,3 +1,19 @@
+2014-01-17  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [CSS Regions] Minor fixes in regions performance tests
+        https://bugs.webkit.org/show_bug.cgi?id=127041
+
+        Reviewed by Ryosuke Niwa.
+
+        Fix minor issues in CSS Regions performance tests.
+
+        * Layout/RegionsAuto.html: Change type to lower case.
+        * Layout/RegionsAutoMaxHeight.html: Ditto.
+        * Layout/RegionsFixed.html: Ditto.
+        * Layout/RegionsFixedShort.html: Ditto.
+        * Layout/RegionsSelection.html: Ditto. Move test methods from regions.js.
+        * Layout/resources/regions.js: Remove moved methods.
+
 2014-01-17  Ryosuke Niwa  <rniwa@webkit.org>
 
         Host DoYouEvenBench on webkit.org
index 67a41f0dad251f601e8a94f3bdf861a26dfa7222..ce5924c19d9e3c7ee7c5bc1bef65874e24b74bdd 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
     <head>
-        <link rel="stylesheet" href="resources/regions.css" TYPE="text/css"></link>
+        <link rel="stylesheet" href="resources/regions.css" type="text/css"></link>
         <script src="../resources/runner.js"></script>
         <script src="resources/regions.js"></script>
         <style type="text/css">
index f138d71290a02dc2a864caefbb720f51faa21850..cc0bbf12a3a44f7cfa045d90dc053616f560967e 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
     <head>
-        <link rel="stylesheet" href="resources/regions.css" TYPE="text/css"></link>
+        <link rel="stylesheet" href="resources/regions.css" type="text/css"></link>
         <script src="../resources/runner.js"></script>
         <script src="resources/regions.js"></script>
         <style type="text/css">
index 50d6093c96b4c07110a759bbed0b7eed85f468e3..2cf70d14a8ca47269e850d446b6cd0966e6316f8 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
     <head>
-        <link rel="stylesheet" href="resources/regions.css" TYPE="text/css"></link>
+        <link rel="stylesheet" href="resources/regions.css" type="text/css"></link>
         <script src="../resources/runner.js"></script>
         <script src="resources/regions.js"></script>
         <style type="text/css">
index 209c6a5f97b54fe7a683539c835952f1d870338c..777a827bae6c9ac73f74d3d127526df7e1294619 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
     <head>
-        <link rel="stylesheet" href="resources/regions.css" TYPE="text/css"></link>
+        <link rel="stylesheet" href="resources/regions.css" type="text/css"></link>
         <script src="../resources/runner.js"></script>
         <script src="resources/regions.js"></script>
         <style type="text/css">
index f098fd92fb6fc751d9ef2e47fe4a39b10c5e7202..9862a9df4bf044d998bd947ea51e3430ff884609 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
     <head>
-        <link rel="stylesheet" href="resources/regions.css" TYPE="text/css"></link>
+        <link rel="stylesheet" href="resources/regions.css" type="text/css"></link>
         <script src="../resources/runner.js"></script>
         <script src="resources/regions.js"></script>
         <style type="text/css">
     <body>
         <pre id="log"></pre>
         <script>
+            function performSelection(paragraphCount) {
+                var paragraphs = document.getElementsByClassName("contentParagraph");
+                var selection = getSelection();
+
+                selection.collapse(paragraphs[0], 0);
+
+                for (var i = 1; i < paragraphCount; i++)
+                    selection.extend(paragraphs[i], 0);
+            }
+
+            function createRegionsSelectionTest(regionCount) {
+                var article = createArticle(regionCount, 1);
+                article.className = "articleInFlow";
+                var regions = createRegions("600px", "auto", regionCount, "auto");
+                document.body.appendChild(article);
+                document.body.appendChild(regions);
+                return {
+                    description: "Testing selection with " + regionCount + " regions. Select text from first region to last one passing through all the regions.",
+                    run: function() {
+                        performSelection(regionCount);
+                    },
+                    setup: function() {
+                        window.getSelection().removeAllRanges();
+                    },
+                    done: function() {
+                        document.body.removeChild(article);
+                        document.body.removeChild(regions);
+                        templateParagraph = null;
+                        templateRegion = null;
+                    }
+                };
+            }
+
             PerfTestRunner.measureTime(createRegionsSelectionTest(100));
         </script>
     </body>
index 508f5af95f5169de7580872b5ab06a04045a5f05..44f820d3391d976f10d595af489e28e4ec9f8d2f 100644 (file)
         };
     }
 
-    function performSelection(paragraphCount) {
-        var paragraphs = document.getElementsByClassName("contentParagraph");
-        var selection = getSelection();
-
-        selection.collapse(paragraphs[0], 0);
-
-        for (var i = 1; i < paragraphCount; i++)
-            selection.extend(paragraphs[i], 0);
-    }
-
-    function createRegionsSelectionTest(regionCount) {
-        var article = createArticle(regionCount, 1);
-        article.className = "articleInFlow";
-        var regions = createRegions("600px", "auto", regionCount, "auto");
-        document.body.appendChild(article);
-        document.body.appendChild(regions);
-        return {
-            description: "Testing selection with " + regionCount + " regions. Select text from first region to last one passing through all the regions.",
-            run: function() {
-                performSelection(regionCount);
-            },
-            setup: function() {
-                window.getSelection().removeAllRanges();
-            },
-            done: function() {
-                document.body.removeChild(article);
-                document.body.removeChild(regions);
-                templateParagraph = null;
-                templateRegion = null;
-            }
-        };
-    }
-
     function createMixedContent(regionCount) {
         var container = document.createElement("div");
         for (var i = 0; i < regionCount; ++i) {
     }
 
     window.createRegionsTest = createRegionsTest;
-    window.createRegionsSelectionTest = createRegionsSelectionTest;
     window.createArticle = createArticle;
+    window.createRegions = createRegions;
     window.createMixedContent = createMixedContent;
 
 })();