Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: LayoutTests/svg/hittest/rect-miterlimit.html

Issue 1120133004: Serialize <number> to round to at most 6 decimals (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Try to fix win Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body onload="onPageLoad()"> 3 <body onload="onPageLoad()">
4 Check that hit testing on a &lt;rect&gt; with various miterlimits around sqrt(2) works properly. If the test passes, you will see "PASS" below. 4 Check that hit testing on a &lt;rect&gt; with various miterlimits around sqrt(2) works properly. If the test passes, you will see "PASS" below.
5 <p id="result">Running test...</p> 5 <p id="result">Running test...</p>
6 <svg id="svg" width="100" height="100" version="1.1"> 6 <svg id="svg" width="100" height="100" version="1.1">
7 <rect id="rect" fill="none" stroke="black" stroke-width="20" x="10" y="10" w idth="80" height="80"/> 7 <rect id="rect" fill="none" stroke="black" stroke-width="20" x="10" y="10" w idth="80" height="80"/>
8 </svg> 8 </svg>
9 <script type="text/javascript"> 9 <script type="text/javascript">
10 if (window.testRunner) { 10 if (window.testRunner) {
11 testRunner.dumpAsText(); 11 testRunner.dumpAsText();
12 testRunner.waitUntilDone(); 12 testRunner.waitUntilDone();
13 } 13 }
14 14
15 var result = document.getElementById("result"), 15 var result = document.getElementById("result"),
16 svg = document.getElementById("svg"), 16 svg = document.getElementById("svg"),
17 rect = document.getElementById("rect"); 17 rect = document.getElementById("rect");
18 function onPageLoad() { 18 function onPageLoad() {
19 // sqrt(2) = 1.414213562373095... 19 // sqrt(2) = 1.414213562373095...
20 var intervals = [ 20 var intervals = [
21 ["1.4", "1.5"], 21 ["1.4", "1.5"],
22 ["1.41", "1.42"], 22 ["1.41", "1.42"],
23 ["1.414", "1.415"], 23 ["1.414", "1.415"],
24 ["1.4142", "1.4143"], 24 ["1.4142", "1.4143"],
25 ["1.41421", "1.41422"], 25 ["1.41421", "1.41422"],
26 ["1.414213", "1.414214"] 26 ["1.414213", "1.414220"]
27 //,["1.4142135", "1.4142136"] 27 //,["1.4142135", "1.4142136"]
28 ]; 28 ];
29 29
30 var bcr = svg.getBoundingClientRect(), 30 var bcr = svg.getBoundingClientRect(),
31 x0 = bcr.left, 31 x0 = bcr.left,
32 y0 = bcr.top; 32 y0 = bcr.top;
33 33
34 var i = 0; 34 var i = 0;
35 requestAnimationFrame(function nextInterval() { 35 requestAnimationFrame(function nextInterval() {
36 if (i >= intervals.length) { 36 if (i >= intervals.length) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return; 83 return;
84 } 84 }
85 85
86 requestAnimationFrame(nextInterval); 86 requestAnimationFrame(nextInterval);
87 }); 87 });
88 }); 88 });
89 } 89 }
90 </script> 90 </script>
91 </body> 91 </body>
92 </html> 92 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698