<!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 { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { 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>[20691] trunk/LayoutTests</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/20691">20691</a></dd>
<dt>Author</dt> <dd>justing</dd>
<dt>Date</dt> <dd>2007-04-03 15:50:34 -0700 (Tue, 03 Apr 2007)</dd>
</dl>
<h3>Log Message</h3>
<pre> Reviewed by darin
<http://bugs.webkit.org/show_bug.cgi?id=13268>
Make editing/selection/drag-in-iframe.html valid and deterministic
* editing/resources/select-and-drag-iframe.html: Removed.
* editing/selection/drag-in-iframe-expected.checksum:
* editing/selection/drag-in-iframe-expected.png:
* editing/selection/drag-in-iframe-expected.txt:
* editing/selection/drag-in-iframe.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestseditingselectiondraginiframeexpectedchecksum">trunk/LayoutTests/editing/selection/drag-in-iframe-expected.checksum</a></li>
<li><a href="#trunkLayoutTestseditingselectiondraginiframeexpectedpng">trunk/LayoutTests/editing/selection/drag-in-iframe-expected.png</a></li>
<li><a href="#trunkLayoutTestseditingselectiondraginiframeexpectedtxt">trunk/LayoutTests/editing/selection/drag-in-iframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingselectiondraginiframehtml">trunk/LayoutTests/editing/selection/drag-in-iframe.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestseditingresourcesselectanddragiframehtml">trunk/LayoutTests/editing/resources/select-and-drag-iframe.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (20690 => 20691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-04-03 22:07:43 UTC (rev 20690)
+++ trunk/LayoutTests/ChangeLog        2007-04-03 22:50:34 UTC (rev 20691)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2007-04-03 Mitz Pettel <mitz@webkit.org>
+
+ Reviewed by darin
+
+ <http://bugs.webkit.org/show_bug.cgi?id=13268>
+ Make editing/selection/drag-in-iframe.html valid and deterministic
+
+ * editing/resources/select-and-drag-iframe.html: Removed.
+ * editing/selection/drag-in-iframe-expected.checksum:
+ * editing/selection/drag-in-iframe-expected.png:
+ * editing/selection/drag-in-iframe-expected.txt:
+ * editing/selection/drag-in-iframe.html:
+
</ins><span class="cx"> 2007-04-03 Adele Peterson <adele@apple.com>
</span><span class="cx">
</span><span class="cx"> Updated results for recent change to always lighten disabled text color for black text.
</span></span></pre></div>
<a id="trunkLayoutTestseditingresourcesselectanddragiframehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/editing/resources/select-and-drag-iframe.html (20690 => 20691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/resources/select-and-drag-iframe.html        2007-04-03 22:07:43 UTC (rev 20690)
+++ trunk/LayoutTests/editing/resources/select-and-drag-iframe.html        2007-04-03 22:50:34 UTC (rev 20691)
</span><span class="lines">@@ -1,3 +0,0 @@
</span><del>-<body contenteditable="true" id="dragme">Drag onto me!<br>Or Me!
-
-</body>
</del><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestseditingselectiondraginiframeexpectedchecksum"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/selection/drag-in-iframe-expected.checksum (20690 => 20691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/selection/drag-in-iframe-expected.checksum        2007-04-03 22:07:43 UTC (rev 20690)
+++ trunk/LayoutTests/editing/selection/drag-in-iframe-expected.checksum        2007-04-03 22:50:34 UTC (rev 20691)
</span><span class="lines">@@ -1 +1 @@
</span><del>-11265ae311eab430bbc9bfc493fbc8df
</del><span class="cx">\ No newline at end of file
</span><ins>+e2c5631ad61edafb104b352de006f4a7
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestseditingselectiondraginiframeexpectedpng"></a>
<div class="binary"><h4>Modified: trunk/LayoutTests/editing/selection/drag-in-iframe-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="trunkLayoutTestseditingselectiondraginiframeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/selection/drag-in-iframe-expected.txt (20690 => 20691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/selection/drag-in-iframe-expected.txt        2007-04-03 22:07:43 UTC (rev 20690)
+++ trunk/LayoutTests/editing/selection/drag-in-iframe-expected.txt        2007-04-03 22:50:34 UTC (rev 20691)
</span><span class="lines">@@ -1,23 +1,29 @@
</span><del>-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 3 of BODY > HTML > #document
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of #text > BODY > HTML > #document to 1 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > BODY > HTML > #document to 1 of #text > BODY > HTML > #document toDOMRange:range from 0 of #text > BODY > HTML > #document to 4 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
</del><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx"> RenderView at (0,0) size 800x600
</span><span class="cx"> layer at (0,0) size 800x600
</span><span class="cx"> RenderBlock {HTML} at (0,0) size 800x600
</span><span class="cx"> RenderBody {BODY} at (8,8) size 784x584
</span><del>- RenderPartObject {IFRAME} at (0,0) size 302x152 [border: (1px solid #000000)]
- layer at (0,0) size 300x150
- RenderView at (0,0) size 300x150
- layer at (0,0) size 300x150
- RenderBlock {HTML} at (0,0) size 300x150
- RenderBody {BODY} at (8,8) size 284x134
- RenderText {#text} at (0,0) size 92x18
- text run at (0,0) width 92: "Drag onto me!"
- RenderBR {BR} at (92,14) size 0x0
- RenderText {#text} at (0,18) size 47x18
- text run at (0,18) width 47: "Or Me!"
- RenderText {#text} at (0,0) size 0x0
- RenderText {#text} at (0,0) size 0x0
</del><ins>+ RenderBlock {P} at (0,0) size 784x36
+ RenderText {#text} at (0,0) size 753x36
+ text run at (0,0) width 538: "This is an automatic pixel test. To test interactively, drag selected text onto the iframe "
+ text run at (538,0) width 215: "below and verify that a drag caret "
+ text run at (0,18) width 156: "appears inside the frame."
+ RenderBlock (anonymous) at (0,52) size 784x152
+ RenderPartObject {IFRAME} at (0,0) size 302x152 [border: (1px solid #000000)]
+ layer at (0,0) size 300x150
+ RenderView at (0,0) size 300x150
+ layer at (0,0) size 300x150
+ RenderBlock {HTML} at (0,0) size 300x150
+ RenderBody {BODY} at (8,8) size 284x134
+ RenderInline {SPAN} at (0,0) size 37x18
+ RenderText {#text} at (0,0) size 37x18
+ text run at (0,0) width 37: "There"
+ RenderText {#text} at (37,0) size 168x18
+ text run at (37,0) width 168: " should be a caret here --> "
+ RenderBR {BR} at (205,14) size 0x0
+ RenderText {#text} at (0,18) size 42x18
+ text run at (0,18) width 42: "See it?"
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
</ins></span></pre></div>
<a id="trunkLayoutTestseditingselectiondraginiframehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/selection/drag-in-iframe.html (20690 => 20691)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/selection/drag-in-iframe.html        2007-04-03 22:07:43 UTC (rev 20690)
+++ trunk/LayoutTests/editing/selection/drag-in-iframe.html        2007-04-03 22:50:34 UTC (rev 20691)
</span><span class="lines">@@ -1,48 +1,43 @@
</span><del>-<script>
-if (window.layoutTestController)
- layoutTestController.dumpEditingCallbacks();
-</script>
</del><ins>+<html>
</ins><span class="cx"> <body contenteditable="true">
</span><del>-<iframe style="border: 1px solid black;" src="../resources/select-and-drag-iframe.html" id="subframe"></iframe>
</del><ins>+ <p>
+ This is an automatic pixel test. To test interactively, drag selected text onto the iframe
+ below and verify that a drag caret appears inside the frame.
+ </p>
+ <iframe onload="test()" id="subframe" style="border: 1px solid black;"
+ src="data:text/html,<body contenteditable><span id='target'>There</span> should be a caret here --> <br>See it?</body>"></iframe>
+ <script>
+ function dragAndDrop()
+ {
+ var iframe = document.getElementById("subframe");
+ var target = iframe.contentDocument.getElementById("target");
+
+ var x1 = iframe.offsetLeft + target.offsetLeft + target.offsetWidth / 2;
+ var x2 = iframe.offsetLeft + iframe.offsetWidth - 20;
+ var y = iframe.offsetTop + target.offsetTop + target.offsetHeight / 2;
+
+ window.getSelection().setBaseAndExtent(target, 0, target, 1);
+
+ eventSender.mouseMoveTo(x1, y);
+ eventSender.dragMode = false;
+ eventSender.mouseDown();
+ eventSender.leapForward(1000);
+ eventSender.mouseMoveTo(x2, y);
+
+ // Dump pixel results before we drop so we can see where the drag caret is painted.
+ layoutTestController.notifyDone();
+
+ eventSender.mouseUp();
+ }
+
+ function test()
+ {
+ if (!window.layoutTestController)
+ return;
</ins><span class="cx">
</span><del>-<script>
-
-function step2() {
- // This is a hack because when we try to get the document
- // for the subframe to get elements from it, the frame fails to load.
- eventSender.mouseMoveTo(30, 20);
- eventSender.mouseDown();
- eventSender.mouseUp();
- eventSender.mouseDown();
- eventSender.mouseUp();
-
- eventSender.leapForward(1000);
- eventSender.mouseDown();
- eventSender.leapForward(500);
- eventSender.mouseMoveTo(200, 20);
-
- // Dump pixel results before we drop so we can see where the drag caret is painted.
- window.layoutTestController.notifyDone();
-
- // Drop outside the subframe to avoid strange bugs when dropping content inside an editable frame.
- eventSender.mouseMoveTo(600, 400);
- eventSender.mouseUp();
-
- // Mouse down to avoid assertion about multiple frames selections.
- eventSender.mouseDown();
- eventSender.mouseUp();
-}
-
-function runTest() {
- if (!window.layoutTestController)
- return;
-
- window.layoutTestController.waitUntilDone();
- // Give the iframe a moment to come into being.
- window.setTimeout(step2, 100);
-}
-
-runTest();
-
-</script>
-</body>
</del><span class="cx">\ No newline at end of file
</span><ins>+ layoutTestController.waitUntilDone();
+ setTimeout(dragAndDrop, 0);
+ }
+ </script>
+</body>
+</html>
</ins></span></pre>
</div>
</div>
</body>
</html>