<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166727] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166727">166727</a></dd>
<dt>Author</dt> <dd>zoltan@webkit.org</dd>
<dt>Date</dt> <dd>2014-04-03 09:49:28 -0700 (Thu, 03 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebInspector] inspector/dom/highlight-shape-outside-margin.html is failing
https://bugs.webkit.org/show_bug.cgi?id=131126

Reviewed by Timothy Hatcher.

I updated the test, so it works with the new testing framework. I included the shape path results in the test,
so we won't run into rounding problems, and we don't have that big test set, which would require an expected
result generation. We can add it later, if we extend the test set. The logic is similar to the non margin test case.

* TestExpectations:
* inspector/dom/highlight-shape-outside-margin-expected.txt:
* inspector/dom/highlight-shape-outside-margin.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsinspectordomhighlightshapeoutsidemarginexpectedtxt">trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomhighlightshapeoutsidemarginhtml">trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (166726 => 166727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-03 16:48:23 UTC (rev 166726)
+++ trunk/LayoutTests/ChangeLog        2014-04-03 16:49:28 UTC (rev 166727)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-04-03  Zoltan Horvath  &lt;zoltan@webkit.org&gt;
+
+        [WebInspector] inspector/dom/highlight-shape-outside-margin.html is failing
+        https://bugs.webkit.org/show_bug.cgi?id=131126
+
+        Reviewed by Timothy Hatcher.
+
+        I updated the test, so it works with the new testing framework. I included the shape path results in the test,
+        so we won't run into rounding problems, and we don't have that big test set, which would require an expected
+        result generation. We can add it later, if we extend the test set. The logic is similar to the non margin test case.
+
+        * TestExpectations:
+        * inspector/dom/highlight-shape-outside-margin-expected.txt:
+        * inspector/dom/highlight-shape-outside-margin.html:
+
</ins><span class="cx"> 2014-04-03  Bem Jones-Bey  &lt;bjonesbe@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Shapes] CRASH with calc() value args in inset round
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (166726 => 166727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2014-04-03 16:48:23 UTC (rev 166726)
+++ trunk/LayoutTests/TestExpectations        2014-04-03 16:49:28 UTC (rev 166727)
</span><span class="lines">@@ -49,8 +49,6 @@
</span><span class="cx"> fast/mediastream/MediaStream-construct-with-ended-tracks.html [ Skip ]
</span><span class="cx"> fast/mediastream/MediaStream-clone.html [ Skip ]
</span><span class="cx"> 
</span><del>-webkit.org/b/126519 inspector/dom/highlight-shape-outside-margin.html [ Failure ]
-
</del><span class="cx"> webkit.org/b/126142 css3/calc/transitions-dependent.html [ Pass Failure ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/124932 media/video-size.html [ Pass Failure ]
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomhighlightshapeoutsidemarginexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin-expected.txt (166726 => 166727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin-expected.txt        2014-04-03 16:48:23 UTC (rev 166726)
+++ trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin-expected.txt        2014-04-03 16:49:28 UTC (rev 166727)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><del>-PASS: Shape roughly equals [M 60 50 L 90 50 C 95.52 50 100 54.48 100 60 L 100 90 C 100 95.52 95.52 100 90 100 L 60 100 C 54.48 100 50 95.52 50 90 L 50 60 C 50 54.48 54.48 50 60 50 Z]
-PASS: Margin shape roughly equals [M 60 40 L 90 40 C 101.05 40 110 48.95 110 60 L 110 90 C 110 101.05 101.05 110 90 110 L 60 110 C 48.95 110 40 101.05 40 90 L 40 60 C 40 48.95 48.95 40 60 40 Z]
-PASS: Shape roughly equals [M 75 25 L 75 25 C 102.61 25 125 47.39 125 75 L 125 75 C 125 102.61 102.61 125 75 125 L 75 125 C 47.39 125 25 102.61 25 75 L 25 75 C 25 47.39 47.39 25 75 25 Z]
-PASS: Margin shape roughly equals [M 75 15 L 75 15 C 108.14 15 135 41.86 135 75 L 135 75 C 135 108.14 108.14 135 75 135 L 75 135 C 41.86 135 15 108.14 15 75 L 15 75 C 15 41.86 41.86 15 75 15 Z]
-PASS: Shape roughly equals [M 50 50 L 100 50 L 100 100 L 50 100 L 50 50 Z]
-PASS: Margin shape roughly equals [M 50 49 L 100 49 L 100 50 L 50 50 L 50 49 Z M 49 50 L 101 50 L 101 100 L 49 100 L 49 50 Z M 50 100 L 100 100 L 100 101 L 50 101 L 50 100 Z]
</del><ins>+PASS: .inset
+PASS: .inset with shape-margin
+PASS: .circle
+PASS: .circle with shape-margin
+PASS: .svg
+PASS: .svg with shape-margin
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomhighlightshapeoutsidemarginhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin.html (166726 => 166727)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin.html        2014-04-03 16:48:23 UTC (rev 166726)
+++ trunk/LayoutTests/inspector/dom/highlight-shape-outside-margin.html        2014-04-03 16:49:28 UTC (rev 166727)
</span><span class="lines">@@ -14,10 +14,10 @@
</span><span class="cx">     -webkit-shape-margin: 10px;
</span><span class="cx"> }
</span><span class="cx"> .inset {
</span><del>-    -webkit-shape-outside: inset(25px 25px 25px 25px round 10px 10px) content-box;
</del><ins>+    -webkit-shape-outside: inset(25px round 10px) content-box;
</ins><span class="cx"> }
</span><span class="cx"> .circle {
</span><del>-    -webkit-shape-outside: circle(50px) content-box;
</del><ins>+    -webkit-shape-outside: circle(25% at center) content-box;
</ins><span class="cx"> }
</span><span class="cx"> .svg {
</span><span class="cx">     -webkit-shape-outside: url(&quot;data:image/svg+xml;utf8,&lt;svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none' width='100px' height='100px'&gt;&lt;rect x='25' y='25' width='50' height='50' fill='blue' /&gt;&lt;/svg&gt;&quot;);
</span><span class="lines">@@ -31,56 +31,35 @@
</span><span class="cx">     var testcases = [
</span><span class="cx">     {
</span><span class="cx">         'selector' : '.inset',
</span><del>-        'shape' : roundedRectCommands(50, 50, 50, 50, 10),
-        'marginShape' : roundedRectCommands(40, 40, 70, 70, 20)
</del><ins>+        'path' : ['M', 60, 50, 'L', 90, 50, 'C', 96, 50, 100, 54, 100, 60, 'L', 100, 90, 'C', 100, 96, 96, 100, 90, 100,
+            'L', 60, 100, 'C', 54, 100, 50, 96, 50, 90, 'L', 50, 60, 'C', 50, 54, 54, 50, 60, 50, 'Z'],
+        'marginPath' : ['M', 60, 40, 'L', 90, 40, 'C', 101, 40, 110, 49, 110, 60, 'L', 110, 90, 'C', 110, 101, 101, 110, 90, 110,
+            'L', 60, 110, 'C', 49, 110, 40, 101, 40, 90, 'L', 40, 60, 'C', 40, 49, 49, 40, 60, 40, 'Z']
</ins><span class="cx">     },
</span><span class="cx">     {
</span><span class="cx">         'selector' : '.circle',
</span><del>-        'shape' : roundedRectCommands(25, 25, 100, 100, 50),
-        'marginShape' : roundedRectCommands(15, 15, 120, 120, 60)
</del><ins>+        'path' : ['M', 75, 63, 'L', 75, 63, 'C', 89, 63, 100, 74, 100, 88, 'L', 100, 88, 'C', 100, 102, 89, 113, 75, 113, 'L', 75, 113,
+            'C', 61, 113, 50, 102, 50, 88, 'L', 50, 88, 'C', 50, 74, 61, 63, 75, 63, 'Z'],
+        'marginPath' : ['M', 75, 53, 'L', 75, 53, 'C', 94, 53, 110, 69, 110, 88, 'L', 110, 88, 'C', 110, 107, 94, 123, 75, 123, 'L', 75, 123,
+            'C', 56, 123, 40, 107, 40, 88, 'L', 40, 88, 'C', 40, 69, 56, 53, 75, 53, 'Z']
</ins><span class="cx">     },
</span><span class="cx">     {
</span><span class="cx">         'selector' : '.svg',
</span><del>-        'shape' : roundedRectCommands(50, 50, 50, 50, 0),
-        'marginShape' : [].concat(roundedRectCommands(50, 49, 50, 1, 0),
-            roundedRectCommands(49, 50, 52, 50, 0),
-            roundedRectCommands(50, 100, 50, 1, 0))
-    }
-    ];
</del><ins>+        'path' : ['M', 50, 63, 'L', 100, 63, 'L', 100, 113, 'L', 50, 113, 'Z'],
+        'marginPath' : ['M', 50, 62, 'L', 100, 62, 'L', 100, 63, 'L', 50, 63, 'Z',
+            'M', 49, 63, 'L', 101, 63, 'L', 101, 113, 'L', 49, 113, 'Z',
+            'M', 50, 113, 'L', 100, 113, 'L', 100, 114, 'L', 50, 114, 'Z']
+    }];
</ins><span class="cx"> 
</span><del>-    function roundedRectCommands(x, y, w, h, r) {
-        if (!r)
-            return ['M', x, y, 'L', x + w, y, 'L', x + w, y + h, 'L', x, y + h, 'L', x, y, 'Z'];
-
-        // Approximate 1 - kappa, see Path.cpp
-        var control = .447715;
-
-        var commands = [];
-
-        commands.push('M', x + r, y);
-        commands.push('L', x + w - r, y);
-        commands.push('C', x + w - control * r, y, x + w, y + control * r, x + w, y + r);
-
-        commands.push('L', x + w, y + h - r);
-        commands.push('C', x + w, y + h - control * r, x + w - control * r, y + h, x + w - r, y + h);
-
-        commands.push('L', x + r, y + h);
-        commands.push('C', x + control * r, y + h, x, y + h - control * r, x, y + h - r);
-
-        commands.push('L', x, y + r);
-        commands.push('C', x, y + control * r, x + control * r, y, x + r, y);
-        commands.push('Z');
-
-        return commands;
-    }
-
</del><span class="cx">     function runNextTest(tests) {
</span><span class="cx">         var testcase = tests[0];
</span><ins>+        var selectorInformation = &quot;Selector: \'&quot; + testcase.selector + &quot;\'&quot;;
</ins><span class="cx"> 
</span><span class="cx">         InspectorTest.Shapes.getShapeOutsideInfoForSelector(testcase.selector, function(payload) {
</span><del>-            InspectorTest.log(&quot;Comparing shape information for selector: &quot; + testcase.selector);
-            InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.shape, testcase.shape, &quot;Shape information was not roughly equal.&quot;);
-            InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.marginShape, testcase.marginShape, &quot;Margin shape information was not roughly equal.&quot;);
</del><ins>+            if (!InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.shape, testcase.path, selectorInformation + &quot; Shape information was not roughly equal.&quot;))
+                InspectorTest.log(&quot;PASS: &quot; + testcase.selector);
+            if (!InspectorTest.Shapes.assertPathsAreRoughlyEqual(payload.marginShape, testcase.marginPath, selectorInformation + &quot; Margin shape information was not roughly equal.&quot;))
+                InspectorTest.log(&quot;PASS: &quot; + testcase.selector + &quot; with shape-margin&quot;);
</ins><span class="cx"> 
</span><span class="cx">             if (tests.length &gt; 1)
</span><span class="cx">                 runNextTest(tests.splice(1));
</span></span></pre>
</div>
</div>

</body>
</html>