[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

tony at chromium.org tony at chromium.org
Thu Apr 8 01:56:47 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit a79b2c844c14a69ee6e4a69504799d229e31e79e
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 23 12:27:50 2010 +0000

    2010-02-23  Tony Chang  <tony at chromium.org>
    
            Not reviewed.
            Revert r55135 because the layout test is failing on all the bots.
            https://bugs.webkit.org/show_bug.cgi?id=34634
    
            * editing/pasteboard/paste-list-004-expected.txt: Removed.
            * editing/pasteboard/paste-list-004.html: Removed.
    2010-02-23  Tony Chang  <tony at chromium.org>
    
            Not reviewed.
            Revert r55135 because the layout test is failing on all the bots.
            https://bugs.webkit.org/show_bug.cgi?id=34634
    
            * editing/ReplaceSelectionCommand.cpp:
            (WebCore::ReplaceSelectionCommand::insertAsListItems):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55143 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ba2de77..9a51294 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-02-23  Tony Chang  <tony at chromium.org>
+
+        Not reviewed.
+        Revert r55135 because the layout test is failing on all the bots.
+        https://bugs.webkit.org/show_bug.cgi?id=34634
+
+        * editing/pasteboard/paste-list-004-expected.txt: Removed.
+        * editing/pasteboard/paste-list-004.html: Removed.
+
 2010-02-23  Yuta Kitamura  <yutak at chromium.org>
 
         Reviewed by Dan Bernstein.
diff --git a/LayoutTests/editing/pasteboard/paste-list-004-expected.txt b/LayoutTests/editing/pasteboard/paste-list-004-expected.txt
deleted file mode 100644
index 8419c58..0000000
--- a/LayoutTests/editing/pasteboard/paste-list-004-expected.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Pasting a list item into the middle of another list item should split the target list item into two with the pasted content in between.
-
-one two: one two
-three: three
-one two: one two
-:
-.four: .four
-monsters walking: <span style="background-color:green"><b>monsters walking</b></span>
-one two: one two
-:
-.cross the floor: <span style="background-color:green"><b>.cross the floor</b></span>
-PASS
-
-
diff --git a/LayoutTests/editing/pasteboard/paste-list-004.html b/LayoutTests/editing/pasteboard/paste-list-004.html
deleted file mode 100644
index bb38af2..0000000
--- a/LayoutTests/editing/pasteboard/paste-list-004.html
+++ /dev/null
@@ -1,71 +0,0 @@
-<body contentEditable="true">
-<p>Pasting a list item into the middle of another list item should split the target list
-item into two with the pasted content in between.</p>
-<ul>
-    <li id="test">one two</li>
-    <li>three.four</li>
-    <li><span style="background-color:green"><b>monsters walking.cross the floor</b></span></li>
-</ul>
-
-<p id="results">FAIL</p>
-</body>
-<script src="../editing.js"></script>
-<script>
-function escapeHTML(text)
-{
-    return text.replace(/&/g, "&amp;").replace(/</g, "&lt;");
-}
-
-function editingTest()
-{
-    // Select the first list item.
-    extendSelectionForwardByLineCommand();
-    copyCommand();
-
-    // Place the cursor between "three" and "four".
-    moveSelectionForwardByLineCommand();
-    moveSelectionForwardByWordCommand();
-
-    pasteCommand();
-
-    // Place the cursor between "walking" and "cross"
-    for (var i = 0; i < 2; ++i)
-        moveSelectionForwardByLineCommand();
-    for (var i = 0; i < 2; ++i)
-        moveSelectionForwardByWordCommand();
-
-    pasteCommand();
-
-    // Verify that the list is as expected.
-    var listItems = document.getElementsByTagName("li");
-    var results = [
-        "one two",
-        "three",
-        "one two",
-        "",
-        ".four",
-        "monsters walking",
-        "one two",
-        "",
-        ".cross the floor"
-        ];
-    if (listItems.length != 9)
-        throw "Expected 8 list items, found " + listItems.length;
-    for (var i = 0; i < results.length; ++i) {
-        if (results[i] != listItems[i].innerText)
-            throw "Unexpected list item: " + i + "," + results[i] + "," + listItems[i].innerText;
-    }
-
-    // Verify that the cursor is in the right place (on the blank line).
-    var selection = window.getSelection();
-    if (selection.baseNode != listItems[7] || selection.baseOffset != 0 || !selection.isCollapsed)
-        throw "Wrong selection position";
-
-    for (var i = 0; i < listItems.length; ++i) {
-      listItems[i].innerHTML += ": " + escapeHTML(listItems[i].innerHTML);
-    }
-}
-
-runDumpAsTextEditingTest(false);
-document.getElementById("results").innerText = "PASS";
-</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b49f4bf..b06db1e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,12 @@
+2010-02-23  Tony Chang  <tony at chromium.org>
+
+        Not reviewed.
+        Revert r55135 because the layout test is failing on all the bots.
+        https://bugs.webkit.org/show_bug.cgi?id=34634
+
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::ReplaceSelectionCommand::insertAsListItems):
+
 2010-02-17  Steve Block  <steveblock at google.com>
 
         Reviewed by Ariya Hidayat.
diff --git a/WebCore/editing/ReplaceSelectionCommand.cpp b/WebCore/editing/ReplaceSelectionCommand.cpp
index 0e5696e..bac090c 100644
--- a/WebCore/editing/ReplaceSelectionCommand.cpp
+++ b/WebCore/editing/ReplaceSelectionCommand.cpp
@@ -1170,34 +1170,26 @@ Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtr<Node> listElement, N
 
     bool isStart = isStartOfParagraph(insertPos);
     bool isEnd = isEndOfParagraph(insertPos);
-    bool isMiddle = !isStart && !isEnd;
-    Node* lastNode = insertionBlock;
-
-    // If we're in the middle of a list item, we should split it into two separate
-    // list items and insert these nodes between them.
-    if (isMiddle) {
-        int textNodeOffset = insertPos.offsetInContainerNode();
-        if (insertPos.node()->isTextNode() && textNodeOffset > 0)
-            splitTextNode(static_cast<Text*>(insertPos.node()), textNodeOffset);
-        splitTreeToNode(insertPos.node(), lastNode, true);
-    }
 
+    Node* lastNode = insertionBlock;
     while (RefPtr<Node> listItem = listElement->firstChild()) {
         ExceptionCode ec = 0;
         listElement->removeChild(listItem.get(), ec);
         ASSERT(!ec);
-        if (isStart || isMiddle)
+        if (isStart)
             insertNodeBefore(listItem, lastNode);
         else if (isEnd) {
             insertNodeAfter(listItem, lastNode);
             lastNode = listItem.get();
-        } else
-            ASSERT_NOT_REACHED();
+        } else {
+            // FIXME: If we're in the middle of a list item, we should split it into two separate
+            // list items and insert these nodes between them.  For now, just append the nodes.
+            insertNodeAfter(listItem, lastNode);
+            lastNode = listItem.get();
+        }
     }
-    if (isStart || isMiddle)
+    if (isStart)
         lastNode = lastNode->previousSibling();
-    if (isMiddle)
-        insertNodeAfter(createListItemElement(document()), lastNode);
     updateNodesInserted(lastNode);
     return lastNode;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list