Add a new perf test to benchmark setting and reading CSS properties from JS.
authoralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2012 08:57:19 +0000 (08:57 +0000)
committeralexis.menard@openbossa.org <alexis.menard@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Mar 2012 08:57:19 +0000 (08:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81155

Reviewed by Ryosuke Niwa.

This benchmark read and set CSS properties from JS. It contains a list
of common CSS properties.

* CSS/CSSPropertySetterGetter.html: Added.

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

PerformanceTests/CSS/CSSPropertySetterGetter.html [new file with mode: 0644]
PerformanceTests/ChangeLog

diff --git a/PerformanceTests/CSS/CSSPropertySetterGetter.html b/PerformanceTests/CSS/CSSPropertySetterGetter.html
new file mode 100644 (file)
index 0000000..19396a9
--- /dev/null
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../resources/runner.js"></script>
+</head>
+<body>
+<div id="test">Content here.</div>
+</body>
+<script>
+var div = document.getElementById("test");
+var properties = {
+'azimuth' : 'right',
+'backgroundColor' : 'green',
+'backgroundImage' : 'url(\'test.png\')',
+'backgroundPosition' : 'top',
+'background-repeat' : 'repeat-x',
+'background' : '#ffffff url(\'img_tree.png\') no-repeat right top',
+'border' : '20px dotted red',
+'borderBottomStyle' : 'dotted',
+'borderCollapse' : 'separate',
+'borderColor' : 'blue',
+'borderSpacing' : '3px',
+'borderStyle' : 'solid',
+'borderTop' : 'green',
+'borderWidth' : '20em',
+'bottom' : '20%',
+'captionSide' : 'top',
+'clear' : 'both',
+'clip' : 'rect(5px, 40px, 45px, 5px)',
+'color' : 'red',
+'content' : 'normal',
+'direction' : 'rtl',
+'display' : 'block',
+'float' : 'right',
+'fontFamily' : '"Times New Roman",Georgia,Serif',
+'fontSize' : '13px',
+'fontVariant' : 'small-caps',
+'fontWeight' : '700',
+'font' : 'italic bold 12px/30px Georgia, serif',
+'height' : '200px',
+'left' : '20%',
+'letterSpacing' : '10px',
+'lineHeight' : '40px',
+'listStyleImage' : 'url(\'test.png\')',
+'listStylePosition' : 'outside',
+'listStyleType' : 'decimal',
+'listStyle' : 'circle inside',
+'marginRight' : '50px',
+'margin' : '10px 20px 30px 5em',
+'maxHeight' : '700px',
+'maxWidth' : '300px',
+'minHeight' : '100px',
+'minWidth' : '100px',
+'outlineColor' : 'gray',
+'outlineStyle' : 'dotted',
+'outlineWidth' : '5px',
+'paddingTop' : '30px',
+'padding' : '30px 20px 10px 50px',
+'pageBreakAfter' : 'always',
+'pageBreakInside' : 'auto',
+'pause' : '2s',
+'position' : 'static',
+'right' : '150px',
+'textAlign' : 'center',
+'textDecoration' : 'blink',
+'textTransform' : 'capitalize',
+'top' : '25%',
+'verticalAlign' : 'text-bottom',
+'visibility' : 'visible',
+'width' : '300px',
+'webkitTransform' : 'scale3d(0.5, 0.5, 0.5)',
+'wordSpacing' : '40px',
+};
+PerfTestRunner.run(function() {
+    for (key in properties) {
+        var value = div.style[key];
+        div.style[key] = "";
+        div.style[key] = properties[key];
+    }
+}, 5000);
+</script>
+</html>
index 7fdebc6..e9cf083 100644 (file)
@@ -1,3 +1,15 @@
+2012-03-14  Alexis Menard  <alexis.menard@openbossa.org>
+
+        Add a new perf test to benchmark setting and reading CSS properties from JS.
+        https://bugs.webkit.org/show_bug.cgi?id=81155
+
+        Reviewed by Ryosuke Niwa.
+
+        This benchmark read and set CSS properties from JS. It contains a list
+        of common CSS properties.
+
+        * CSS/CSSPropertySetterGetter.html: Added.
+
 2012-03-14  Alexandru Chiculita  <achicu@adobe.com>
 
         Layout/floats.html should be runnable by run-perf-tests