<!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>[181952] releases/WebKitGTK/webkit-2.8</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/181952">181952</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-03-25 04:40:32 -0700 (Wed, 25 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/181888">r181888</a> - Update empty image canvas tests and fix a related bug
https://bugs.webkit.org/show_bug.cgi?id=142694

Reviewed by Chris Dumez.

Source/WebCore:

During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
we encountered an issue with canvas tests related to empty image handling
when drawn or used as a pattern. After updating these tests, an issue with
pattern handling was encountered.

The spec, as well as Chrome's implementation, say that when an empty image
is used as a pattern, createPattern should return null. See
https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
Instead, createPattern returned an exception in this case.
This patch fixes that and makes sure that it returns a null when image loading hasn't started.

Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
       canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
       canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
       canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
       canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createPattern): Return &quot;null&quot; if image is not fully decodeable.

LayoutTests:

Tests below imported from https://github.com/w3c/web-platform-tests/tree/master/2dcontext/drawing-images-to-the-canvas
* canvas/philip/tests/2d.drawImage.incomplete-expected.txt: Removed.
* canvas/philip/tests/2d.drawImage.incomplete.emptysrc-expected.txt: Added.
* canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html: Added.
* canvas/philip/tests/2d.drawImage.incomplete.html: Removed.
* canvas/philip/tests/2d.drawImage.incomplete.nosrc-expected.txt: Added.
* canvas/philip/tests/2d.drawImage.incomplete.nosrc.html: Added.
* canvas/philip/tests/2d.drawImage.incomplete.removedsrc-expected.txt: Added.
* canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html: Added.

Tests below imported from https://github.com/w3c/web-platform-tests/tree/master/2dcontext/fill-and-stroke-styles
* canvas/philip/tests/2d.pattern.image.incomplete-expected.txt: Removed.
* canvas/philip/tests/2d.pattern.image.incomplete.empty-expected.txt: Removed.
* canvas/philip/tests/2d.pattern.image.incomplete.empty.html: Removed.
* canvas/philip/tests/2d.pattern.image.incomplete.emptysrc-expected.txt: Added.
* canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html: Added.
* canvas/philip/tests/2d.pattern.image.incomplete.html: Removed.
* canvas/philip/tests/2d.pattern.image.incomplete.omitted-expected.txt: Removed.
* canvas/philip/tests/2d.pattern.image.incomplete.omitted.html: Removed.
* canvas/philip/tests/2d.pattern.image.incomplete.removedsrc-expected.txt: Added.
This test currently fails and will be fixed in https://bugs.webkit.org/show_bug.cgi?id=142677
* canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html: Added.

Test below imported from https://chromium.googlesource.com/chromium/blink/+/master/LayoutTests/fast/canvas/
* fast/canvas/canvas-empty-image-pattern.html: Aligned with spec/Chrome.
* fast/canvas/canvas-empty-image-pattern-expected.txt: Aligned with spec/Chrome.
* TestExpectations: Added 2d.pattern.image.incomplete.removedsrc.html as an expected failure.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasemptyimagepatternexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasemptyimagepatternhtml">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">releases/WebKitGTK/webkit-2.8/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteemptysrcexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.emptysrc-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteemptysrchtml">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompletenosrcexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.nosrc-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompletenosrchtml">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.nosrc.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteremovedsrcexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.removedsrc-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteremovedsrchtml">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteemptysrcexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.emptysrc-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteemptysrchtml">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteremovedsrcexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.removedsrc-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteremovedsrchtml">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompletehtml">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteemptyexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.empty-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteemptyhtml">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.empty.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompletehtml">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteomittedexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.omitted-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteomittedhtml">releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.omitted.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasemptyimagepatternexpectedpng">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern-expected.png</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit28LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2015-03-23  Yoav Weiss  &lt;yoav@yoav.ws&gt;
+
+        Update empty image canvas tests and fix a related bug
+        https://bugs.webkit.org/show_bug.cgi?id=142694
+
+        Reviewed by Chris Dumez.
+
+        Tests below imported from https://github.com/w3c/web-platform-tests/tree/master/2dcontext/drawing-images-to-the-canvas
+        * canvas/philip/tests/2d.drawImage.incomplete-expected.txt: Removed.
+        * canvas/philip/tests/2d.drawImage.incomplete.emptysrc-expected.txt: Added.
+        * canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html: Added.
+        * canvas/philip/tests/2d.drawImage.incomplete.html: Removed.
+        * canvas/philip/tests/2d.drawImage.incomplete.nosrc-expected.txt: Added.
+        * canvas/philip/tests/2d.drawImage.incomplete.nosrc.html: Added.
+        * canvas/philip/tests/2d.drawImage.incomplete.removedsrc-expected.txt: Added.
+        * canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html: Added.
+
+        Tests below imported from https://github.com/w3c/web-platform-tests/tree/master/2dcontext/fill-and-stroke-styles
+        * canvas/philip/tests/2d.pattern.image.incomplete-expected.txt: Removed.
+        * canvas/philip/tests/2d.pattern.image.incomplete.empty-expected.txt: Removed.
+        * canvas/philip/tests/2d.pattern.image.incomplete.empty.html: Removed.
+        * canvas/philip/tests/2d.pattern.image.incomplete.emptysrc-expected.txt: Added.
+        * canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html: Added.
+        * canvas/philip/tests/2d.pattern.image.incomplete.html: Removed.
+        * canvas/philip/tests/2d.pattern.image.incomplete.omitted-expected.txt: Removed.
+        * canvas/philip/tests/2d.pattern.image.incomplete.omitted.html: Removed.
+        * canvas/philip/tests/2d.pattern.image.incomplete.removedsrc-expected.txt: Added.
+        This test currently fails and will be fixed in https://bugs.webkit.org/show_bug.cgi?id=142677
+        * canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html: Added.
+
+        Test below imported from https://chromium.googlesource.com/chromium/blink/+/master/LayoutTests/fast/canvas/
+        * fast/canvas/canvas-empty-image-pattern.html: Aligned with spec/Chrome.
+        * fast/canvas/canvas-empty-image-pattern-expected.txt: Aligned with spec/Chrome.
+        * TestExpectations: Added 2d.pattern.image.incomplete.removedsrc.html as an expected failure.
+
</ins><span class="cx"> 2015-03-23  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Make platform/mac-wk2/plugins/destroy-during-async-npp-new.html work again
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteexpectedtxt"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete-expected.txt (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete-expected.txt        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-Passed
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteemptysrcexpectedtxt"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.emptysrc-expected.txt (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.emptysrc-expected.txt                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.emptysrc-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+2d.drawImage.incomplete.emptysrc
+
+Actual output:
+
+Expected output:
+
+
+
+
+
+PASS Canvas test: 2d.drawImage.incomplete.emptysrc 
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteemptysrchtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --&gt;
+&lt;title&gt;Canvas test: 2d.drawImage.incomplete.emptysrc&lt;/title&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/common/canvas-tests.js&quot;&gt;&lt;/script&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;/common/canvas-tests.css&quot;&gt;
+&lt;body class=&quot;show_output&quot;&gt;
+
+&lt;h1&gt;2d.drawImage.incomplete.emptysrc&lt;/h1&gt;
+&lt;p class=&quot;desc&quot;&gt;&lt;/p&gt;
+
+
+&lt;p class=&quot;output&quot;&gt;Actual output:&lt;/p&gt;
+&lt;canvas id=&quot;c&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;50&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
+&lt;p class=&quot;output expectedtext&quot;&gt;Expected output:&lt;p&gt;&lt;img src=&quot;/images/green-100x50.png&quot; class=&quot;output expected&quot; id=&quot;expected&quot; alt=&quot;&quot;&gt;
+&lt;ul id=&quot;d&quot;&gt;&lt;/ul&gt;
+&lt;script&gt;
+var t = async_test(&quot;&quot;);
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('red.png');
+img.src = &quot;&quot;;
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, &quot;50,25&quot;, &quot;0,255,0,255&quot;, 2);
+
+
+});
+&lt;/script&gt;
+&lt;img src=&quot;/images/red.png&quot; id=&quot;red.png&quot; class=&quot;resource&quot;&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompletehtml"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.html (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.html        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1,25 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;title&gt;Canvas test: 2d.drawImage.incomplete&lt;/title&gt;
-&lt;script src=&quot;../tests.js&quot;&gt;&lt;/script&gt;
-&lt;link rel=&quot;stylesheet&quot; href=&quot;../tests.css&quot;&gt;
-&lt;body&gt;
-&lt;p id=&quot;passtext&quot;&gt;Pass&lt;/p&gt;
-&lt;p id=&quot;failtext&quot;&gt;Fail&lt;/p&gt;
-&lt;p class=&quot;output&quot;&gt;These images should be identical:&lt;/p&gt;
-&lt;canvas id=&quot;c&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;50&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
-&lt;p class=&quot;output expectedtext&quot;&gt;Expected output:&lt;p&gt;&lt;img src=&quot;green-100x50.png&quot; class=&quot;output expected&quot; id=&quot;expected&quot; alt=&quot;&quot;&gt;
-&lt;ul id=&quot;d&quot;&gt;&lt;/ul&gt;
-&lt;script&gt;
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var img = new Image();
-img.src = &quot;NotARealFileName.png&quot;;
-_assertSame(img.complete, false, &quot;img.complete&quot;, &quot;false&quot;);
-ctx.drawImage(img, 0, 0);
-
-
-});
-&lt;/script&gt;
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompletenosrcexpectedtxt"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.nosrc-expected.txt (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.nosrc-expected.txt                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.nosrc-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+2d.drawImage.incomplete.nosrc
+
+Actual output:
+
+Expected output:
+
+
+
+
+PASS Canvas test: 2d.drawImage.incomplete.nosrc 
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompletenosrchtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.nosrc.html (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.nosrc.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.nosrc.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --&gt;
+&lt;title&gt;Canvas test: 2d.drawImage.incomplete.nosrc&lt;/title&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/common/canvas-tests.js&quot;&gt;&lt;/script&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;/common/canvas-tests.css&quot;&gt;
+&lt;body class=&quot;show_output&quot;&gt;
+
+&lt;h1&gt;2d.drawImage.incomplete.nosrc&lt;/h1&gt;
+&lt;p class=&quot;desc&quot;&gt;&lt;/p&gt;
+
+
+&lt;p class=&quot;output&quot;&gt;Actual output:&lt;/p&gt;
+&lt;canvas id=&quot;c&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;50&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
+&lt;p class=&quot;output expectedtext&quot;&gt;Expected output:&lt;p&gt;&lt;img src=&quot;/images/green-100x50.png&quot; class=&quot;output expected&quot; id=&quot;expected&quot; alt=&quot;&quot;&gt;
+&lt;ul id=&quot;d&quot;&gt;&lt;/ul&gt;
+&lt;script&gt;
+var t = async_test(&quot;&quot;);
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = new Image();
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, &quot;50,25&quot;, &quot;0,255,0,255&quot;, 2);
+
+
+});
+&lt;/script&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteremovedsrcexpectedtxt"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.removedsrc-expected.txt (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.removedsrc-expected.txt                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.removedsrc-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+2d.drawImage.incomplete.removedsrc
+
+Actual output:
+
+Expected output:
+
+
+
+
+
+PASS Canvas test: 2d.drawImage.incomplete.removedsrc 
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2ddrawImageincompleteremovedsrchtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --&gt;
+&lt;title&gt;Canvas test: 2d.drawImage.incomplete.removedsrc&lt;/title&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/common/canvas-tests.js&quot;&gt;&lt;/script&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;/common/canvas-tests.css&quot;&gt;
+&lt;body class=&quot;show_output&quot;&gt;
+
+&lt;h1&gt;2d.drawImage.incomplete.removedsrc&lt;/h1&gt;
+&lt;p class=&quot;desc&quot;&gt;&lt;/p&gt;
+
+
+&lt;p class=&quot;output&quot;&gt;Actual output:&lt;/p&gt;
+&lt;canvas id=&quot;c&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;50&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
+&lt;p class=&quot;output expectedtext&quot;&gt;Expected output:&lt;p&gt;&lt;img src=&quot;/images/green-100x50.png&quot; class=&quot;output expected&quot; id=&quot;expected&quot; alt=&quot;&quot;&gt;
+&lt;ul id=&quot;d&quot;&gt;&lt;/ul&gt;
+&lt;script&gt;
+var t = async_test(&quot;&quot;);
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+var img = document.getElementById('red.png');
+img.removeAttribute('src');
+ctx.drawImage(img, 0, 0);
+_assertPixelApprox(canvas, 50,25, 0,255,0,255, &quot;50,25&quot;, &quot;0,255,0,255&quot;, 2);
+
+
+});
+&lt;/script&gt;
+&lt;img src=&quot;/images/red.png&quot; id=&quot;red.png&quot; class=&quot;resource&quot;&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteexpectedtxt"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete-expected.txt (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete-expected.txt        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-Passed
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteemptyexpectedtxt"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.empty-expected.txt (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.empty-expected.txt        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.empty-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1,2 +0,0 @@
</span><del>-Passed
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteemptyhtml"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.empty.html (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.empty.html        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.empty.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1,28 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;title&gt;Canvas test: 2d.pattern.image.incomplete.empty&lt;/title&gt;
-&lt;script src=&quot;../tests.js&quot;&gt;&lt;/script&gt;
-&lt;link rel=&quot;stylesheet&quot; href=&quot;../tests.css&quot;&gt;
-&lt;body&gt;
-&lt;p id=&quot;passtext&quot;&gt;Pass&lt;/p&gt;
-&lt;p id=&quot;failtext&quot;&gt;Fail&lt;/p&gt;
-&lt;p class=&quot;output&quot;&gt;These images should be identical:&lt;/p&gt;
-&lt;canvas id=&quot;c&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;50&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
-
-&lt;ul id=&quot;d&quot;&gt;&lt;/ul&gt;
-&lt;script&gt;
-_addTest(function(canvas, ctx) {
-
-var img = document.getElementById('green.png');
-img.src = &quot;&quot;;
-var _thrown = undefined;
-try{
-  ctx.createPattern(img, 'repeat');
-}catch(e) {
-  _thrown = e;
-}
-_assert(_thrown &amp;&amp; _thrown.name == &quot;InvalidStateError&quot; &amp;&amp; _thrown.code == DOMException.INVALID_STATE_ERR, &quot;should throw InvalidStateError&quot;);
-
-});
-&lt;/script&gt;
-&lt;img src=&quot;../images/green.png&quot; id=&quot;green.png&quot; class=&quot;resource&quot;&gt;
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteemptysrcexpectedtxt"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.emptysrc-expected.txt (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.emptysrc-expected.txt                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.emptysrc-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+2d.pattern.image.incomplete.emptysrc
+
+Actual output:
+

+
+PASS Canvas test: 2d.pattern.image.incomplete.emptysrc 
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteemptysrchtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --&gt;
+&lt;title&gt;Canvas test: 2d.pattern.image.incomplete.emptysrc&lt;/title&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/common/canvas-tests.js&quot;&gt;&lt;/script&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;/common/canvas-tests.css&quot;&gt;
+&lt;body class=&quot;show_output&quot;&gt;
+
+&lt;h1&gt;2d.pattern.image.incomplete.emptysrc&lt;/h1&gt;
+&lt;p class=&quot;desc&quot;&gt;&lt;/p&gt;
+
+
+&lt;p class=&quot;output&quot;&gt;Actual output:&lt;/p&gt;
+&lt;canvas id=&quot;c&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;50&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
+
+&lt;ul id=&quot;d&quot;&gt;&lt;/ul&gt;
+&lt;script&gt;
+var t = async_test(&quot;&quot;);
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('red.png');
+img.src = &quot;&quot;;
+_assertSame(ctx.createPattern(img, 'repeat'), null, &quot;ctx.createPattern(img, 'repeat')&quot;, &quot;null&quot;);
+
+
+});
+&lt;/script&gt;
+&lt;img src=&quot;/images/red.png&quot; id=&quot;red.png&quot; class=&quot;resource&quot;&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompletehtml"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.html (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.html        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1,23 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;title&gt;Canvas test: 2d.pattern.image.incomplete&lt;/title&gt;
-&lt;script src=&quot;../tests.js&quot;&gt;&lt;/script&gt;
-&lt;link rel=&quot;stylesheet&quot; href=&quot;../tests.css&quot;&gt;
-&lt;body&gt;
-&lt;p id=&quot;passtext&quot;&gt;Pass&lt;/p&gt;
-&lt;p id=&quot;failtext&quot;&gt;Fail&lt;/p&gt;
-&lt;p class=&quot;output&quot;&gt;These images should be identical:&lt;/p&gt;
-&lt;canvas id=&quot;c&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;50&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
-
-&lt;ul id=&quot;d&quot;&gt;&lt;/ul&gt;
-&lt;script&gt;
-_addTest(function(canvas, ctx) {
-
-var img = new Image();
-img.src = &quot;NotARealFileName.png&quot;;
-_assertSame(img.complete, false, &quot;img.complete&quot;, &quot;false&quot;);
-_assertSame(ctx.createPattern(img, 'repeat'), null, &quot;ctx.createPattern(img, 'repeat')&quot;, &quot;null&quot;);
-
-
-});
-&lt;/script&gt;
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteomittedexpectedtxt"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.omitted-expected.txt (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.omitted-expected.txt        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.omitted-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1 +0,0 @@
</span><del>-Passed
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteomittedhtml"></a>
<div class="delfile"><h4>Deleted: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.omitted.html (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.omitted.html        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.omitted.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1,23 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;title&gt;Canvas test: 2d.pattern.image.incomplete.omitted&lt;/title&gt;
-&lt;script src=&quot;../tests.js&quot;&gt;&lt;/script&gt;
-&lt;link rel=&quot;stylesheet&quot; href=&quot;../tests.css&quot;&gt;
-&lt;body&gt;
-&lt;p id=&quot;passtext&quot;&gt;Pass&lt;/p&gt;
-&lt;p id=&quot;failtext&quot;&gt;Fail&lt;/p&gt;
-&lt;p class=&quot;output&quot;&gt;These images should be identical:&lt;/p&gt;
-&lt;canvas id=&quot;c&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;50&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
-
-&lt;ul id=&quot;d&quot;&gt;&lt;/ul&gt;
-&lt;script&gt;
-_addTest(function(canvas, ctx) {
-
-var img = document.getElementById('green.png');
-img.removeAttribute('src');
-_assertSame(ctx.createPattern(img, 'repeat'), null, &quot;ctx.createPattern(img, 'repeat')&quot;, &quot;null&quot;);
-
-
-});
-&lt;/script&gt;
-&lt;img src=&quot;../images/green.png&quot; id=&quot;green.png&quot; class=&quot;resource&quot;&gt;
-
</del></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteremovedsrcexpectedtxt"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.removedsrc-expected.txt (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.removedsrc-expected.txt                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.removedsrc-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+2d.pattern.image.incomplete.removedsrc
+
+Actual output:
+

+
+PASS Canvas test: 2d.pattern.image.incomplete.removedsrc 
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestscanvasphiliptests2dpatternimageincompleteremovedsrchtml"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html (0 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --&gt;
+&lt;title&gt;Canvas test: 2d.pattern.image.incomplete.removedsrc&lt;/title&gt;
+&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../../../imported/w3c/web-platform-tests/common/canvas-tests.js&quot;&gt;&lt;/script&gt;
+&lt;link rel=&quot;stylesheet&quot; href=&quot;/common/canvas-tests.css&quot;&gt;
+&lt;body class=&quot;show_output&quot;&gt;
+
+&lt;h1&gt;2d.pattern.image.incomplete.removedsrc&lt;/h1&gt;
+&lt;p class=&quot;desc&quot;&gt;&lt;/p&gt;
+
+
+&lt;p class=&quot;output&quot;&gt;Actual output:&lt;/p&gt;
+&lt;canvas id=&quot;c&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;50&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
+
+&lt;ul id=&quot;d&quot;&gt;&lt;/ul&gt;
+&lt;script&gt;
+var t = async_test(&quot;&quot;);
+_addTest(function(canvas, ctx) {
+
+var img = document.getElementById('red.png');
+img.removeAttribute('src');
+_assertSame(ctx.createPattern(img, 'repeat'), null, &quot;ctx.createPattern(img, 'repeat')&quot;, &quot;null&quot;);
+
+
+});
+&lt;/script&gt;
+&lt;img src=&quot;/images/red.png&quot; id=&quot;red.png&quot; class=&quot;resource&quot;&gt;
+
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasemptyimagepatternexpectedpng"></a>
<div class="binary"><h4>Deleted: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasemptyimagepatternexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern-expected.txt (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern-expected.txt        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern-expected.txt        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1,2 +1,2 @@
</span><del>-CONSOLE MESSAGE: line 9: InvalidStateError: DOM Exception 11: An attempt was made to use an object that is not, or is no longer, usable.
</del><ins>+TEST PASSED
</ins><span class="cx"> 
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasemptyimagepatternhtml"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern.html (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern.html        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-empty-image-pattern.html        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1,11 +1,15 @@
</span><span class="cx"> &lt;!DOCTYPE HTML&gt;
</span><span class="cx"> &lt;title&gt;Canvas test: filling a pattern with an empty image should not crash.&lt;/title&gt;
</span><ins>+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;canvas id=&quot;canvas&quot; class=&quot;output&quot; width=&quot;100&quot; height=&quot;100&quot;&gt;&lt;p class=&quot;fallback&quot;&gt;FAIL (fallback content)&lt;/p&gt;&lt;/canvas&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> if (window.testRunner)
</span><span class="cx">     testRunner.dumpAsText(true);
</span><span class="cx"> 
</span><span class="cx"> var canvas = document.getElementById(&quot;canvas&quot;).getContext(&quot;2d&quot;);
</span><del>-canvas.fillStyle = canvas.createPattern(new Image, &quot;repeat&quot;)
-canvas.fillRect(0,0,1,1)
</del><ins>+var pattern = canvas.createPattern(new Image, &quot;repeat&quot;)
+if (pattern)
+    document.getElementById(&quot;console&quot;).innerHTML = &quot;TEST FAILED&quot;;
+else
+    document.getElementById(&quot;console&quot;).innerHTML = &quot;TEST PASSED&quot;;
</ins><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-03-23 Yoav Weiss  &lt;yoav@yoav.ws&gt;
+
+        Update empty image canvas tests and fix a related bug
+        https://bugs.webkit.org/show_bug.cgi?id=142694
+
+        Reviewed by Chris Dumez.
+
+        During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
+        we encountered an issue with canvas tests related to empty image handling
+        when drawn or used as a pattern. After updating these tests, an issue with
+        pattern handling was encountered.
+
+        The spec, as well as Chrome's implementation, say that when an empty image
+        is used as a pattern, createPattern should return null. See
+        https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
+        Instead, createPattern returned an exception in this case.
+        This patch fixes that and makes sure that it returns a null when image loading hasn't started.
+
+        Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
+               canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
+               canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
+               canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
+               canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html
+
+        * html/canvas/CanvasRenderingContext2D.cpp:
+        (WebCore::CanvasRenderingContext2D::createPattern): Return &quot;null&quot; if image is not fully decodeable.
+
</ins><span class="cx"> 2015-03-20  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (181951 => 181952)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-03-25 11:32:41 UTC (rev 181951)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-03-25 11:40:32 UTC (rev 181952)
</span><span class="lines">@@ -1751,11 +1751,12 @@
</span><span class="cx">     if (ec)
</span><span class="cx">         return 0;
</span><span class="cx"> 
</span><del>-    if (!image-&gt;complete())
-        return 0;
</del><ins>+    CachedImage* cachedImage = image-&gt;cachedImage();
+    // If the image loading hasn't started or the image is not complete, it is not fully decodable.
+    if (!cachedImage || !image-&gt;complete())
+        return nullptr;
</ins><span class="cx"> 
</span><del>-    CachedImage* cachedImage = image-&gt;cachedImage();
-    if (!cachedImage || cachedImage-&gt;status() == CachedResource::LoadError) {
</del><ins>+    if (cachedImage-&gt;status() == CachedResource::LoadError) {
</ins><span class="cx">         ec = INVALID_STATE_ERR;
</span><span class="cx">         return 0;
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>