aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-09-12 13:12:49 -0700
committerBrian Anderson <banderson@mozilla.com>2013-09-12 13:12:51 -0700
commit0db96944e6619b1235a350a4cd511b72e08328d0 (patch)
tree252729ed5adb2dec7039477764d24db5d77f590d /src
parent4cf80cd49c69a0da4b9d8c7df0ca5a9ece3b5a64 (diff)
downloadservo-0db96944e6619b1235a350a4cd511b72e08328d0.tar.gz
servo-0db96944e6619b1235a350a4cd511b72e08328d0.zip
Longcat improvements
This fixes layout under Firefox and increases the frame rate for smoother animation.
Diffstat (limited to 'src')
-rw-r--r--src/test/html/longcat.html3
-rw-r--r--src/test/html/longcat.js5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/test/html/longcat.html b/src/test/html/longcat.html
index 53e13c3fcee..612a1dac758 100644
--- a/src/test/html/longcat.html
+++ b/src/test/html/longcat.html
@@ -1,5 +1,8 @@
<html>
<head>
+<style type="text/css">
+ p { margin: 0px; fonts-size: 0px }
+</style>
</head>
<body>
<p><img src="longcattop.png"/></p>
diff --git a/src/test/html/longcat.js b/src/test/html/longcat.js
index d492c3417c4..0e3a0991fa4 100644
--- a/src/test/html/longcat.js
+++ b/src/test/html/longcat.js
@@ -14,10 +14,11 @@ function wait_for_img_load(f) {
wait_for_img_load(function() {
var count = 0;
function elongate() {
- let height = Math.round((Math.sin(count) + 1) * 70 + 20);
+ var height = Math.round((Math.cos(count + Math.PI) + 1) * 100 + 20);
count += 0.2;
longcat_mid.height = height;
- window.setTimeout(function() { elongate() }, 100);
+ longcat_mid.width = 600;
+ window.setTimeout(function() { elongate() }, 50);
}
elongate();
});