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

Side by Side Diff: LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001.html

Issue 230403003: [CSS Shapes] large corner radius combined with 0 radius does not wrap properly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use unprefixed version Created 6 years, 8 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
« no previous file with comments | « no previous file | LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script src="../resources/subpixel-utils.js"></script>
4 <style>
5 #container {
6 width: 300px;
7 font: 20px/1 Ahem;
8 color: green;
9 }
10
11 #float {
12 float: left;
13 width: 100px;
14 height: 100px;
15 border-radius: 100px 0px;
16 background-color: blue;
17 background-clip: border-box;
18 shape-outside: border-box;
19 }
20 </style>
21 <body>
22 <p>The green squares should follow the right side of the blue shape. They sh ould not overlap the shape.</p>
23 <div id="container">
24 <div id="float"></div>
25 <span id="a">X</span><br>
26 <span id="b">X</span><br>
27 <span id="c">X</span><br>
28 <span id="d">X</span><br>
29 <span id="e">X</span><br>
30 <span id="f">X</span>
31 </div>
32 <div id="console"></div>
33 </body>
34 <script>
35 function elementRect(elementId)
36 {
37 var s = document.getElementById("container").getBoundingClientRect();
38 var r = document.getElementById(elementId).getBoundingClientRect();
39 return {right: (r.left - s.left) + r.width, top: r.top - s.top, width: r.wid th, height: r.height};
40 }
41
42 function borderXIntercept(y)
43 {
44 var radiusSquared = 100 * 100;
45 var f = SubPixelLayout.snapToLayoutUnit(Math.sqrt(radiusSquared - y * y));
46 return f + 20; // will be compared with the right edge of a 20x20 Ahem char cell
47 }
48
49 var quiet = true; // PASS output depends on SubPixelLayout.isEnabled()
50
51 shouldBe("elementRect('a').top", "0");
52 shouldBe("elementRect('a').right", "120");
53
54 shouldBe("elementRect('b').top", "20");
55 shouldBeCloseTo("elementRect('b').right", borderXIntercept(20), 1, quiet);
56
57 shouldBe("elementRect('c').top", "40");
58 shouldBeCloseTo("elementRect('c').right", borderXIntercept(40), 1, quiet);
59
60 shouldBe("elementRect('d').top", "60");
61 shouldBeCloseTo("elementRect('d').right", borderXIntercept(60), 1, quiet);
62
63 shouldBe("elementRect('e').top", "80");
64 shouldBeCloseTo("elementRect('e').right", borderXIntercept(80), 1, quiet);
65
66 shouldBe("elementRect('f').top", "100");
67 shouldBe("elementRect('f').right", "20");
68 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698