[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

rniwa at webkit.org rniwa at webkit.org
Wed Dec 22 11:39:27 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cbfed81d6121f2a34f166993078149188a43d971
Author: rniwa at webkit.org <rniwa at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 3 00:00:42 2010 +0000

    2010-07-30  Ryosuke Niwa  <rniwa at webkit.org>
    
            Reviewed by Ojan Vafai.
    
            Remove setNodeToDump from dump-as-markup.js
            https://bugs.webkit.org/show_bug.cgi?id=43286
    
            Removed Removed Markup.setNodeToDump, replaced all calls to this method by calls to dump.
            Because we want need to avoid printing "Dump of markup 1:" when dump is called only once,
            Markup.dump no longer adds the text on the first call. Instead, it'll insert the text
            on the second call when the first call didn't have the description.
    
            * editing/execCommand/create-list-from-range-selection.html: Replaced setNodeToDump by dump
            * editing/execCommand/hilitecolor.html: Replaced setNodeToDump by dump
            * editing/execCommand/insert-list-empty-div.html: Replaced setNodeToDump by dump
            * editing/execCommand/switch-list-type-with-inner-list.html: Replaced setNodeToDump by dump
            * editing/execCommand/switch-list-type-with-orphaned-li.html: Replaced setNodeToDump by dump
            * editing/selection/home-inside-noneditable-table.html: Replaced setNodeToDump by dump
            * editing/style/remove-underline-from-stylesheet.html: Replaced setNodeToDump by dump
            * resources/dump-as-markup.js: Removed Markup.setNodeToDump.
            (Markup.dump):
            (Markup.notifyDone):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64507 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7ee480f..41484cb 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,26 @@
+2010-07-30  Ryosuke Niwa  <rniwa at webkit.org>
+
+        Reviewed by Ojan Vafai.
+
+        Remove setNodeToDump from dump-as-markup.js
+        https://bugs.webkit.org/show_bug.cgi?id=43286
+
+        Removed Removed Markup.setNodeToDump, replaced all calls to this method by calls to dump.
+        Because we want need to avoid printing "Dump of markup 1:" when dump is called only once,
+        Markup.dump no longer adds the text on the first call. Instead, it'll insert the text
+        on the second call when the first call didn't have the description.
+
+        * editing/execCommand/create-list-from-range-selection.html: Replaced setNodeToDump by dump
+        * editing/execCommand/hilitecolor.html: Replaced setNodeToDump by dump
+        * editing/execCommand/insert-list-empty-div.html: Replaced setNodeToDump by dump
+        * editing/execCommand/switch-list-type-with-inner-list.html: Replaced setNodeToDump by dump
+        * editing/execCommand/switch-list-type-with-orphaned-li.html: Replaced setNodeToDump by dump
+        * editing/selection/home-inside-noneditable-table.html: Replaced setNodeToDump by dump
+        * editing/style/remove-underline-from-stylesheet.html: Replaced setNodeToDump by dump
+        * resources/dump-as-markup.js: Removed Markup.setNodeToDump.
+        (Markup.dump):
+        (Markup.notifyDone):
+
 2010-08-02  Martin Robinson  <mrobinson at igalia.com>
 
         Reviewed by Xan Lopez.
diff --git a/LayoutTests/editing/execCommand/create-list-from-range-selection.html b/LayoutTests/editing/execCommand/create-list-from-range-selection.html
index 43c723c..b727805 100644
--- a/LayoutTests/editing/execCommand/create-list-from-range-selection.html
+++ b/LayoutTests/editing/execCommand/create-list-from-range-selection.html
@@ -7,5 +7,5 @@ var start = document.getElementById("start").firstChild;
 var end = document.getElementById("end").firstChild;
 s.setBaseAndExtent(start, 2, end, 2);
 document.execCommand("InsertOrderedList", false, "");
-Markup.setNodeToDump("test");
+Markup.dump("test");
 </script>
diff --git a/LayoutTests/editing/execCommand/hilitecolor.html b/LayoutTests/editing/execCommand/hilitecolor.html
index b2f6651..4b0184e 100644
--- a/LayoutTests/editing/execCommand/hilitecolor.html
+++ b/LayoutTests/editing/execCommand/hilitecolor.html
@@ -14,5 +14,5 @@ sel.modify("extend", "backward", "word");
 document.execCommand("HiliteColor", false, "red");
 sel.modify("move", "backward", "line");
 
-Markup.setNodeToDump('test')
+Markup.dump('test')
 </script>
diff --git a/LayoutTests/editing/execCommand/insert-list-empty-div.html b/LayoutTests/editing/execCommand/insert-list-empty-div.html
index 80972f6..24d993d 100644
--- a/LayoutTests/editing/execCommand/insert-list-empty-div.html
+++ b/LayoutTests/editing/execCommand/insert-list-empty-div.html
@@ -8,5 +8,5 @@ var div = document.getElementById("div");
 sel.setPosition(div, 0);
 
 document.execCommand("InsertUnorderedList");
-Markup.setNodeToDump("div");
+Markup.dump("div");
 </script>
diff --git a/LayoutTests/editing/execCommand/switch-list-type-with-inner-list.html b/LayoutTests/editing/execCommand/switch-list-type-with-inner-list.html
index 126deef..f7d4fd8 100644
--- a/LayoutTests/editing/execCommand/switch-list-type-with-inner-list.html
+++ b/LayoutTests/editing/execCommand/switch-list-type-with-inner-list.html
@@ -11,10 +11,11 @@
 </div>
 <script>
 Markup.description('This tests switching an unordered list with a nested list to an ordered list.');
-Markup.setNodeToDump('test');
 
 var test = document.getElementById('test');
 window.getSelection().selectAllChildren(test);
 document.execCommand('InsertOrderedList', false, null);
+
+Markup.dump('test');
 </script>
 </body>
diff --git a/LayoutTests/editing/execCommand/switch-list-type-with-orphaned-li.html b/LayoutTests/editing/execCommand/switch-list-type-with-orphaned-li.html
index 908d1f5..8c87a29 100644
--- a/LayoutTests/editing/execCommand/switch-list-type-with-orphaned-li.html
+++ b/LayoutTests/editing/execCommand/switch-list-type-with-orphaned-li.html
@@ -14,10 +14,11 @@
 </div>
 <script>
 Markup.description('This tests switching multiple lists with an orphaned list child to an ordered list.');
-Markup.setNodeToDump('test');
 
 var test = document.getElementById('test');
 window.getSelection().selectAllChildren(test);
 document.execCommand('InsertOrderedList', false, null);
+
+Markup.dump('test');
 </script>
 </body>
diff --git a/LayoutTests/editing/selection/focus-contenteditable-iframe-expected.txt b/LayoutTests/editing/selection/focus-contenteditable-iframe-expected.txt
index f1e8201..ca2c387 100644
--- a/LayoutTests/editing/selection/focus-contenteditable-iframe-expected.txt
+++ b/LayoutTests/editing/selection/focus-contenteditable-iframe-expected.txt
@@ -1,6 +1,4 @@
 This tests focusing the body element in a contentEditable iframe. The whole body contents should be selected. Focus should only place the cursor at the beginning of the body if there isn't an existing selection.
-
-Dump of markup 1:
 | <html>
 |   <head>
 |   <body>
diff --git a/LayoutTests/editing/selection/home-inside-noneditable-table.html b/LayoutTests/editing/selection/home-inside-noneditable-table.html
index d873938..7eb93d3 100644
--- a/LayoutTests/editing/selection/home-inside-noneditable-table.html
+++ b/LayoutTests/editing/selection/home-inside-noneditable-table.html
@@ -12,12 +12,11 @@
 <script>
 
 Markup.description("Tests whether home moves the caret to the beginning of line inside a content-editable in an uneditable table.")
-Markup.setNodeToDump('test');
 
 var s = window.getSelection();
 s.setPosition(document.getElementById('l1').firstChild, 23);
-Markup.dump();
+Markup.dump('test');
 s.modify("move", "backward", "lineboundary");
-Markup.dump();
+Markup.dump('test');
 
 </script>
diff --git a/LayoutTests/editing/style/remove-underline-from-stylesheet.html b/LayoutTests/editing/style/remove-underline-from-stylesheet.html
index 4ee445d..d91b0e8 100644
--- a/LayoutTests/editing/style/remove-underline-from-stylesheet.html
+++ b/LayoutTests/editing/style/remove-underline-from-stylesheet.html
@@ -39,8 +39,8 @@ function editingTest() {
 </div>
 <script>
 Markup.description('This tests removing underline from stylesheet (.editing has underline). Because text-decoration that comes from a style rule cannot be pushed down, the underline should stay. (see bug 27809).');
-Markup.setNodeToDump('root');
 runEditingTest();
+Markup.dump('root');
 </script>
 </body>
 </html>
diff --git a/LayoutTests/resources/dump-as-markup.js b/LayoutTests/resources/dump-as-markup.js
index b6eee92..5676f3a 100644
--- a/LayoutTests/resources/dump-as-markup.js
+++ b/LayoutTests/resources/dump-as-markup.js
@@ -35,23 +35,19 @@ Markup.dump = function(opt_node, opt_description)
     if (typeof opt_node == 'string')
         opt_node = document.getElementById(opt_node);
 
-    var node = opt_node || Markup._node || document
+    var node = opt_node || document
     var markup = "";
 
-    if (Markup._test_description && !Markup._dumpCalls)
-        markup += Markup._test_description + '\n';
-
     Markup._dumpCalls++;
 
-    // If dump is not called by notifyDone, then print out optional description
-    // because this test is manually calling dump.
-    if (!Markup._done || opt_description) {
+    if (Markup._dumpCalls > 1 || opt_description) {
         if (!opt_description)
             opt_description = "Dump of markup " + Markup._dumpCalls
         if (Markup._dumpCalls > 1)
             markup += '\n';
         markup += '\n' + opt_description + ':\n';
-    }
+    } else
+        Markup._firstCallDidNotHaveDescription = true;
 
     markup += Markup.get(node);
 
@@ -60,6 +56,11 @@ Markup.dump = function(opt_node, opt_description)
         Markup._container.style.width = '100%';
     }
 
+    if (Markup._dumpCalls == 2 && Markup._firstCallDidNotHaveDescription) {
+        var wrapper = Markup._container.getElementsByClassName('dump-as-markup-span')[0];
+        wrapper.insertBefore(document.createTextNode('\nDump of markup 1:\n'), wrapper.firstChild);
+    }
+
     // FIXME: Have this respect layoutTestController.dumpChildFramesAsText?
     // FIXME: Should we care about framesets?
     var iframes = node.getElementsByTagName('iframe');
@@ -72,7 +73,13 @@ Markup.dump = function(opt_node, opt_description)
         }
     }
 
-    Markup._container.appendChild(document.createTextNode(markup));
+    if (Markup._test_description && Markup._dumpCalls == 1)
+        Markup._container.appendChild(document.createTextNode(Markup._test_description + '\n'))
+
+    var wrapper = document.createElement('span');
+    wrapper.className = 'dump-as-markup-span';
+    wrapper.appendChild(document.createTextNode(markup));
+    Markup._container.appendChild(wrapper);
 }
 
 Markup.noAutoDump = function()
@@ -89,8 +96,8 @@ Markup.waitUntilDone = function()
 Markup.notifyDone = function()
 {
     // Need to waitUntilDone or some tests won't finish appending the markup before the text is dumped.
-    layoutTestController.waitUntilDone();
-    Markup._done = true;
+    if (window.layoutTestController)
+        layoutTestController.waitUntilDone();
 
     // If dump has already been called, don't bother to dump again
     if (!Markup._dumpCalls)
@@ -108,13 +115,6 @@ Markup.notifyDone = function()
         layoutTestController.notifyDone();
 }
 
-Markup.setNodeToDump = function(node)
-{
-    if (typeof node == "string")
-        node = document.getElementById(node);
-    Markup._node = node
-}
-
 Markup.get = function(node)
 {
     if (!node.firstChild)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list