2011-04-06 Sheriff Bot <webkit.review.bot@gmail.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 20:55:17 +0000 (20:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Apr 2011 20:55:17 +0000 (20:55 +0000)
        Unreviewed, rolling out r83039.
        http://trac.webkit.org/changeset/83039
        https://bugs.webkit.org/show_bug.cgi?id=57978

        introduced a new regression in conjunction to
        ReplaceSelectionCommand (Requested by rniwa on #webkit).

        * editing/inserting/insert-paragraph-separator-tab-span-expected.txt: Removed.
        * editing/inserting/insert-paragraph-separator-tab-span.html: Removed.
2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r83039.
        http://trac.webkit.org/changeset/83039
        https://bugs.webkit.org/show_bug.cgi?id=57978

        introduced a new regression in conjunction to
        ReplaceSelectionCommand (Requested by rniwa on #webkit).

        * editing/EditingStyle.cpp:
        (WebCore::EditingStyle::init):
        * editing/InsertParagraphSeparatorCommand.cpp:
        (WebCore::InsertParagraphSeparatorCommand::doApply):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83097 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/editing/inserting/insert-paragraph-separator-tab-span-expected.txt [deleted file]
LayoutTests/editing/inserting/insert-paragraph-separator-tab-span.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/editing/EditingStyle.cpp
Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp

index b67f59f..a35074a 100644 (file)
@@ -1,3 +1,15 @@
+2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r83039.
+        http://trac.webkit.org/changeset/83039
+        https://bugs.webkit.org/show_bug.cgi?id=57978
+
+        introduced a new regression in conjunction to
+        ReplaceSelectionCommand (Requested by rniwa on #webkit).
+
+        * editing/inserting/insert-paragraph-separator-tab-span-expected.txt: Removed.
+        * editing/inserting/insert-paragraph-separator-tab-span.html: Removed.
+
 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
 
         Reviewed by David Levin.
diff --git a/LayoutTests/editing/inserting/insert-paragraph-separator-tab-span-expected.txt b/LayoutTests/editing/inserting/insert-paragraph-separator-tab-span-expected.txt
deleted file mode 100644 (file)
index 49e1376..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-This test ensures WebKit avoids cloning Apple tab span when inserting a paragraph separator.
-Only tab should be inside a Apple tab span in the following tests.
-
-last visible position:
-| <span>
-|   class="Apple-tab-span"
-|   style="white-space:pre"
-|   "  "
-| <div>
-|   "hello world WebKit <#selection-caret>"
-
-first visible position:
-| <div>
-|   <br>
-| "hello world WebKit <#selection-caret>"
-| <span>
-|   class="Apple-tab-span"
-|   style="white-space:pre"
-|   "  "
-
-before tab span:
-| "hi, "
-| <div>
-|   "hello world WebKit <#selection-caret>"
-|   <span>
-|     class="Apple-tab-span"
-|     style="white-space:pre"
-|     "        "
-|   " rocks"
-
-after tab span:
-| "hi, "
-| <span>
-|   class="Apple-tab-span"
-|   style="white-space:pre"
-|   "  "
-| " rockshello world WebKit <#selection-caret>"
-| <div>
diff --git a/LayoutTests/editing/inserting/insert-paragraph-separator-tab-span.html b/LayoutTests/editing/inserting/insert-paragraph-separator-tab-span.html
deleted file mode 100644 (file)
index 406ddb7..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<div contenteditable title="1: last visible position" style="word-wrap: break-word; width: 10ex; border: solid thin black;"><span class="Apple-tab-span" style="white-space:pre">      </span></div>
-<div contenteditable title="0: first visible position" style="word-wrap: break-word; width: 10ex; border: solid thin black;"><span class="Apple-tab-span" style="white-space:pre">     </span></div>
-<div contenteditable title="1: before tab span" style="word-wrap: break-word; width: 10ex; border: solid thin black;">hi, <span class="Apple-tab-span" style="white-space:pre">        </span> rocks</div>
-<div contenteditable title="2: after tab span" style="word-wrap: break-word; width: 10ex; border: solid thin black;">hi, <span class="Apple-tab-span" style="white-space:pre"> </span> rocks</div>
-<script src="../../resources/dump-as-markup.js"></script>
-<script>
-
-Markup.description('This test ensures WebKit avoids cloning Apple tab span when inserting a paragraph separator.\n'+
-    'Only tab should be inside a Apple tab span in the following tests.');
-
-function runTest(div) {
-    var offset = div.title.substr(0, div.title.indexOf(':'));
-    window.getSelection().setPosition(div, offset);
-    document.execCommand("InsertParagraph");
-    document.execCommand("InsertText", false, "hello world WebKit ");
-    Markup.dump(div, div.title.substr(div.title.indexOf(': ') + 2));
-}
-
-var divs = document.getElementsByTagName('div');
-var tests = new Array();
-for (var i = 0; i < divs.length; i++)
-    tests.push(divs[i]);
-
-for (i in tests)
-    runTest(tests[i]);
-
-</script>
-</body>
-</html>
index a8083a1..f5c4f03 100644 (file)
@@ -1,3 +1,17 @@
+2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r83039.
+        http://trac.webkit.org/changeset/83039
+        https://bugs.webkit.org/show_bug.cgi?id=57978
+
+        introduced a new regression in conjunction to
+        ReplaceSelectionCommand (Requested by rniwa on #webkit).
+
+        * editing/EditingStyle.cpp:
+        (WebCore::EditingStyle::init):
+        * editing/InsertParagraphSeparatorCommand.cpp:
+        (WebCore::InsertParagraphSeparatorCommand::doApply):
+
 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
 
         Reviewed by David Levin.
index b2195a9..668c943 100644 (file)
@@ -300,11 +300,6 @@ EditingStyle::~EditingStyle()
 
 void EditingStyle::init(Node* node, PropertiesToInclude propertiesToInclude)
 {
-    if (isTabSpanTextNode(node))
-        node = tabSpanNode(node)->parentNode();
-    else if (isTabSpanNode(node))
-        node = node->parentNode();
-
     RefPtr<CSSComputedStyleDeclaration> computedStyleAtPosition = computedStyle(node);
     m_mutableStyle = propertiesToInclude == AllProperties && computedStyleAtPosition ? computedStyleAtPosition->copy() : editingStyleFromComputedStyle(computedStyleAtPosition);
 
index 5af08ad..771c56a 100644 (file)
@@ -239,7 +239,7 @@ void InsertParagraphSeparatorCommand::doApply()
         // Recreate the same structure in the new paragraph.
         
         Vector<Element*> ancestors;
-        getAncestorsInsideBlock(positionBeforeTabSpan(insertionPosition).deprecatedNode(), startBlock, ancestors);      
+        getAncestorsInsideBlock(insertionPosition.deprecatedNode(), startBlock, ancestors);      
         RefPtr<Element> parent = cloneHierarchyUnderNewBlock(ancestors, blockToInsert);
         
         appendBlockPlaceholder(parent);
@@ -254,9 +254,6 @@ void InsertParagraphSeparatorCommand::doApply()
     // similar case where previous position is in another, presumeably nested, block.
     if (isFirstInBlock || !inSameBlock(visiblePos, visiblePos.previous())) {
         Node *refNode;
-        
-        insertionPosition = positionBeforeTabSpan(insertionPosition);
-
         if (isFirstInBlock && !nestNewBlock)
             refNode = startBlock;
         else if (insertionPosition.deprecatedNode() == startBlock && nestNewBlock) {
@@ -273,7 +270,7 @@ void InsertParagraphSeparatorCommand::doApply()
         // Recreate the same structure in the new paragraph.
 
         Vector<Element*> ancestors;
-        getAncestorsInsideBlock(positionAvoidingSpecialElementBoundary(positionBeforeTabSpan(insertionPosition)).deprecatedNode(), startBlock, ancestors);
+        getAncestorsInsideBlock(positionAvoidingSpecialElementBoundary(insertionPosition).deprecatedNode(), startBlock, ancestors);
         
         appendBlockPlaceholder(cloneHierarchyUnderNewBlock(ancestors, blockToInsert));
         
@@ -306,7 +303,7 @@ void InsertParagraphSeparatorCommand::doApply()
 
     // Build up list of ancestors in between the start node and the start block.
     Vector<Element*> ancestors;
-    getAncestorsInsideBlock(positionBeforeTabSpan(insertionPosition).deprecatedNode(), startBlock, ancestors);
+    getAncestorsInsideBlock(insertionPosition.deprecatedNode(), startBlock, ancestors);
 
     // Make sure we do not cause a rendered space to become unrendered.
     // FIXME: We need the affinity for pos, but pos.downstream() does not give it