<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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, #msg p { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul { overflow: auto; }
#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>
<title>[29034] trunk</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/29034">29034</a></dd>
<dt>Author</dt> <dd>ap@webkit.org</dd>
<dt>Date</dt> <dd>2007-12-29 22:13:40 -0800 (Sat, 29 Dec 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=14428
        FCKEditor: Images disappear on drag/drop and copy/paste

        Test: editing/pasteboard/drag-image-in-about-blank-frame.html

        * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use &quot;about:blank&quot; as a
        base URL, just like we don't use an empty one.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkWebCoreChangeLog">trunk/WebCore/ChangeLog</a></li>
<li><a href="#trunkWebCoreeditingmarkupcpp">trunk/WebCore/editing/markup.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestseditingpasteboarddragimageinaboutblankframeexpectedtxt">trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingpasteboarddragimageinaboutblankframehtml">trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (29033 => 29034)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-12-30 03:33:44 UTC (rev 29033)
+++ trunk/LayoutTests/ChangeLog        2007-12-30 06:13:40 UTC (rev 29034)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2007-12-29  Alexey Proskuryakov  &lt;ap@webkit.org&gt;
+
+        Reviewed by Darin.
+
+        http://bugs.webkit.org/show_bug.cgi?id=14428
+        FCKEditor: Images disappear on drag/drop and copy/paste
+
+        * editing/pasteboard/drag-image-in-about-blank-frame-expected.txt: Added.
+        * editing/pasteboard/drag-image-in-about-blank-frame.html: Added.
+
</ins><span class="cx"> 2007-12-28  Alexey Proskuryakov  &lt;ap@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Mitz.
</span></span></pre></div>
<a id="trunkLayoutTestseditingpasteboarddragimageinaboutblankframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame-expected.txt (0 => 29034)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame-expected.txt                                (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame-expected.txt        2007-12-30 06:13:40 UTC (rev 29034)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+Bug 14428: FCKEditor: Images disappear on drag/drop and copy/paste
+
+SUCCESS
</ins><span class="cx">Property changes on: trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame-expected.txt
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/plain
</span><span class="cx">Name: svn:eol-style
</span><span class="cx">   + native
</span></span></pre></div>
<a id="trunkLayoutTestseditingpasteboarddragimageinaboutblankframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame.html (0 => 29034)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame.html                                (rev 0)
+++ trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame.html        2007-12-30 06:13:40 UTC (rev 29034)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;script&gt;
+if (window.layoutTestController) {
+    layoutTestController.waitUntilDone();
+    layoutTestController.dumpAsText();
+}
+
+function log(message) {
+    var console = document.getElementById(&quot;console&quot;);
+    var li = document.createElement(&quot;li&quot;);
+    var text = document.createTextNode(message);
+    
+    console.appendChild(li);
+    li.appendChild(text);
+}
+
+function step1() {
+    window.frames[0].document.write(&quot;&lt;div contenteditable&gt;drag&lt;img src='../resources/abe.png' id=dragme&gt;me&lt;span id=target&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&quot;);
+    setTimeout(&quot;step2()&quot;, 100);
+}
+
+function step2() {
+    if (!window.layoutTestController) {
+        log(&quot;This test uses eventSender. To run it manually, drag the selected image to another position in the editable div and drop it. It should not disappear.&quot;);
+        return;
+    }
+    
+    var doc = window.frames[0].document;
+    e = doc.getElementById(&quot;dragme&quot;);
+    x = e.offsetLeft + e.offsetWidth / 2;
+    y = e.offsetTop + e.offsetHeight / 2;
+    
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();    
+    e = doc.getElementById(&quot;target&quot;);
+    x = e.offsetLeft + e.offsetWidth / 2;
+    y = e.offsetTop + e.offsetHeight / 2;
+    
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseUp();
+
+    document.write(&quot;&lt;p&gt;&lt;a href='http://bugs.webkit.org/show_bug.cgi?id=14428'&gt;Bug 14428&lt;/a&gt;: FCKEditor: Images disappear on drag/drop and copy/paste&lt;/p&gt;&quot;);
+
+    if (doc.getElementById(&quot;dragme&quot;).parentNode.tagName == &quot;SPAN&quot; &amp;&amp; doc.getElementById(&quot;dragme&quot;).src.length &gt; 10)
+        document.write(&quot;&lt;p&gt;SUCCESS&lt;/p&gt;&quot;);
+    else
+        document.write(&quot;&lt;p&gt;FAILURE&lt;/p&gt;&quot;);
+
+    layoutTestController.notifyDone();
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;setTimeout('step1()', 100)&quot;&gt;
+&lt;iframe src=&quot;about:blank&quot;&gt;&lt;/iframe&gt;
+&lt;ul id=&quot;console&quot;&gt;&lt;/ul&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/editing/pasteboard/drag-image-in-about-blank-frame.html
</span><span class="cx">___________________________________________________________________
</span><span class="cx">Name: svn:mime-type
</span><span class="cx">   + text/html
</span></span></pre></div>
<a id="trunkWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/ChangeLog (29033 => 29034)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/ChangeLog        2007-12-30 03:33:44 UTC (rev 29033)
+++ trunk/WebCore/ChangeLog        2007-12-30 06:13:40 UTC (rev 29034)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2007-12-29  Alexey Proskuryakov  &lt;ap@webkit.org&gt;
+
+        Reviewed by Darin.
+
+        http://bugs.webkit.org/show_bug.cgi?id=14428
+        FCKEditor: Images disappear on drag/drop and copy/paste
+
+        Test: editing/pasteboard/drag-image-in-about-blank-frame.html
+
+        * editing/markup.cpp: (WebCore::createFragmentFromMarkup): Don't use &quot;about:blank&quot; as a
+        base URL, just like we don't use an empty one.
+
</ins><span class="cx"> 2007-12-29  Jan Michael Alonzo  &lt;jmalonzo@unpluggable.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Alp Toker.
</span></span></pre></div>
<a id="trunkWebCoreeditingmarkupcpp"></a>
<div class="modfile"><h4>Modified: trunk/WebCore/editing/markup.cpp (29033 => 29034)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/WebCore/editing/markup.cpp        2007-12-30 03:33:44 UTC (rev 29033)
+++ trunk/WebCore/editing/markup.cpp        2007-12-30 06:13:40 UTC (rev 29034)
</span><span class="lines">@@ -890,7 +890,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;DocumentFragment&gt; fragment = element-&gt;createContextualFragment(markup);
</span><span class="cx"> 
</span><del>-    if (fragment &amp;&amp; !baseURL.isEmpty() &amp;&amp; baseURL != document-&gt;baseURL())
</del><ins>+    if (fragment &amp;&amp; !baseURL.isEmpty() &amp;&amp; baseURL != &quot;about:blank&quot; &amp;&amp; baseURL != document-&gt;baseURL())
</ins><span class="cx">         completeURLs(fragment.get(), baseURL);
</span><span class="cx"> 
</span><span class="cx">     return fragment.release();
</span></span></pre>
</div>
</div>

</body>
</html>