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

Unified Diff: LayoutTests/inspector/elements/highlight-css-shapes-outside.html

Issue 237313003: CSS shapes support in Web Inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review comments Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/inspector/elements/highlight-css-shapes-outside.html
diff --git a/LayoutTests/inspector/elements/highlight-css-shapes-outside.html b/LayoutTests/inspector/elements/highlight-css-shapes-outside.html
new file mode 100644
index 0000000000000000000000000000000000000000..2c161f8c082869ccee65c6b29c8c01a70454a073
--- /dev/null
+++ b/LayoutTests/inspector/elements/highlight-css-shapes-outside.html
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style>
+
+.float {
+ width: 8em;
+ height: 8em;
+ float: left;
+ shape-margin: 2em;
+ margin: 1em;
+}
+
+.circle {
+ background-color:blue;
+ shape-outside: circle(closest-side at center);
+ -webkit-clip-path: circle(closest-side at center);
+}
+
+.contentBox {
+ background-color:blue;
+ border-radius: 2em 4em 2em 2em;
+ border-width: 3em 1em 2em 1em;
+ padding: 1em 1em 1em 2em;
+ margin: 2em 1em 1em 1em;
+ shape-outside: content-box;
+ -webkit-clip-path: content-box;
+}
+
+.insetSimpleRound {
+ background-color:green;
+ shape-outside: inset(30% round 20%);
+ -webkit-clip-path: inset(30% round 20%);
+}
+
+.insetComplexRound {
+ background-color:blue;
+ shape-outside: inset(10% round 10% 40% 10% 40%);
+ -webkit-clip-path: inset(10% round 10% 40% 10% 40%);
+}
+
+.ellipse {
+ background-color:green;
+ height: 5em;
+ shape-outside: ellipse(closest-side closest-side);
+ -webkit-clip-path: ellipse(closest-side closest-side);
+}
+
+.raster {
+ background-color: blue;
+ shape-outside: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100px' height='100px'><rect width='100' height='100' fill='green'/></svg>");
+}
+
+.polygon {
+ background-color: green;
+ shape-outside: polygon(0px 0px, 0px 200px, 200px 0px);
+}
+
+</style>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/elements-test.js"></script>
+<script>
+
+function test()
+{
+ var list = ["circle", "insetSimpleRound", "insetComplexRound", "ellipse", "contentBox", "polygon", "raster"];
+ var index = 0;
+ function selectNode()
+ {
+ InspectorTest.selectNodeWithId(String(list[index++]), evaluate);
+ }
+ function evaluate(node)
+ {
+ InspectorTest.dumpInspectorHighlightShape(node, (index == list.length) ? InspectorTest.completeTest.bind(InspectorTest): selectNode);
+ }
+ selectNode();
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<div class="float circle" id="circle"> </div>
+<div class="float insetSimpleRound" id="insetSimpleRound"> </div>
+<div class="float insetComplexRound" id="insetComplexRound"> </div>
+<div class="float ellipse" id="ellipse"> </div>
+<div class="float contentBox" id="contentBox"> </div>
+<div class="float polygon" id="polygon"> </div>
+<div class="float raster" id="raster"> </div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698