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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001.html
diff --git a/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001.html b/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001.html
new file mode 100644
index 0000000000000000000000000000000000000000..1e2c5ad7d20f970b1d2096d0fbe3d67a5d573046
--- /dev/null
+++ b/LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius-001.html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<script src="../resources/subpixel-utils.js"></script>
+<style>
+#container {
+ width: 300px;
+ font: 20px/1 Ahem;
+ color: green;
+}
+
+#float {
+ float: left;
+ width: 100px;
+ height: 100px;
+ border-radius: 100px 0px;
+ background-color: blue;
+ background-clip: border-box;
+ shape-outside: border-box;
+}
+</style>
+<body>
+ <p>The green squares should follow the right side of the blue shape. They should not overlap the shape.</p>
+ <div id="container">
+ <div id="float"></div>
+ <span id="a">X</span><br>
+ <span id="b">X</span><br>
+ <span id="c">X</span><br>
+ <span id="d">X</span><br>
+ <span id="e">X</span><br>
+ <span id="f">X</span>
+ </div>
+ <div id="console"></div>
+</body>
+<script>
+function elementRect(elementId)
+{
+ var s = document.getElementById("container").getBoundingClientRect();
+ var r = document.getElementById(elementId).getBoundingClientRect();
+ return {right: (r.left - s.left) + r.width, top: r.top - s.top, width: r.width, height: r.height};
+}
+
+function borderXIntercept(y)
+{
+ var radiusSquared = 100 * 100;
+ var f = SubPixelLayout.snapToLayoutUnit(Math.sqrt(radiusSquared - y * y));
+ return f + 20; // will be compared with the right edge of a 20x20 Ahem char cell
+}
+
+var quiet = true; // PASS output depends on SubPixelLayout.isEnabled()
+
+shouldBe("elementRect('a').top", "0");
+shouldBe("elementRect('a').right", "120");
+
+shouldBe("elementRect('b').top", "20");
+shouldBeCloseTo("elementRect('b').right", borderXIntercept(20), 1, quiet);
+
+shouldBe("elementRect('c').top", "40");
+shouldBeCloseTo("elementRect('c').right", borderXIntercept(40), 1, quiet);
+
+shouldBe("elementRect('d').top", "60");
+shouldBeCloseTo("elementRect('d').right", borderXIntercept(60), 1, quiet);
+
+shouldBe("elementRect('e').top", "80");
+shouldBeCloseTo("elementRect('e').right", borderXIntercept(80), 1, quiet);
+
+shouldBe("elementRect('f').top", "100");
+shouldBe("elementRect('f').right", "20");
+</script>
« 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