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

Side by Side Diff: LayoutTests/svg/custom/getBBox-circle-has-one-zero-value.html

Issue 208323007: Fix getBBox() returning (0,0) bug when width or height is zero (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@myzbackup
Patch Set: Created 6 years, 9 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
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <!-- Test that svg bounding boxes are valid for a zero-width or zero-height circ le -->
4 <head>
5 <script type="text/javascript">
6 function checkBoundingBoxHasZeroValue() {
7 if (window.testRunner)
8 window.testRunner.dumpAsText();
9 var circle1 = document.getElementById('circle1').getBBox();
10 var circle2 = document.getElementById('circle2').getBBox();
11 var circle3 = document.getElementById('circle3').getBBox();
12 var circle4 = document.getElementById('circle4').getBBox();
13 var results = "FAIL";
14 if (circle1.width == 100 &&
15 circle1.height == 100 &&
16 circle2.width == 0 &&
17 circle2.height == 0 &&
18 circle3.width == 100 &&
19 circle3.height == 100 &&
20 circle4.width == 0 &&
21 circle4.height == 0)
22 results = "PASS";
23 document.body.innerHTML = results + ", bounding boxes sizes are (" +
24 circle1.width + ", " + circle1.height + "), (" +
25 circle2.width + ", " + circle2.height + "), (" +
26 circle3.width + ", " + circle3.height + ") and (" +
27 circle4.width + ", " + circle4.height + ")";
28 }
29 </script>
30 </head>
31 <body onload="checkBoundingBoxHasZeroValue()">
32 <svg>
33 <circle id="circle1" cx="300" cy="300" r="50"/>
34 <circle id="circle2" cx="300" cy="300" r="0"/>
35 <circle id="circle3" vector-effect="non-scaling-stroke" cx="300" cy= "300" r="50"/>
36 <circle id="circle4" vector-effect="non-scaling-stroke" cx="300" cy= "300" r="0"/>
37 </svg>
38 <body>
39 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698