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

enrica at apple.com enrica at apple.com
Thu Apr 8 00:19:08 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 01f87303642de6872ef93f4a3dc5e6b2d319d513
Author: enrica at apple.com <enrica at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 4 19:49:37 2009 +0000

    Mail.app crashes when indenting table pasted from Numbers.app.
    <rdar://problem/7209507>
    https://bugs.webkit.org/show_bug.cgi?id=32166
    
    Reviewed by John Sullivan.
    
    WebCore:
    
    Test: LayoutTests/editing/execCommand/indent-partial-table.html
    
    * editing/IndentOutdentCommand.cpp:
    (WebCore::IndentOutdentCommand::indentRegion): Added test to verify that the end of the paragraph
    after the selection has not been moved.
    
    LayoutTests:
    
    * editing/execCommand/indent-partial-table-expected.txt: Added.
    * editing/execCommand/indent-partial-table.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51704 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 992a69b..b985c7a 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2009-12-04  Enrica Casucci  <enrica at apple.com>
+
+        Reviewed by John Sullivan.
+
+        Mail.app crashes when indenting table pasted from Numbers.app.
+        <rdar://problem/7209507>
+        https://bugs.webkit.org/show_bug.cgi?id=32166
+
+        * editing/execCommand/indent-partial-table-expected.txt: Added.
+        * editing/execCommand/indent-partial-table.html: Added.
+
 2009-12-04  Alexey Proskuryakov  <ap at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/editing/execCommand/indent-partial-table-expected.txt b/LayoutTests/editing/execCommand/indent-partial-table-expected.txt
new file mode 100644
index 0000000..316c912
--- /dev/null
+++ b/LayoutTests/editing/execCommand/indent-partial-table-expected.txt
@@ -0,0 +1,10 @@
+This tests for a crash when indenting a table that is not entirely selected.
+
+
+
+One	Two
+Three	Four
+
+
+
+
diff --git a/LayoutTests/editing/execCommand/indent-partial-table.html b/LayoutTests/editing/execCommand/indent-partial-table.html
new file mode 100644
index 0000000..b53a04f
--- /dev/null
+++ b/LayoutTests/editing/execCommand/indent-partial-table.html
@@ -0,0 +1,27 @@
+<p>This tests for a crash when indenting a table that is not entirely selected.</p>
+<div contenteditable="true" id="test">
+    <div><br></div>
+    <div id="start"><br></div>
+        <table border="1">
+            <tbody> 
+                <tr id="firstrow">
+                 <td>One</td>
+                 <td>Two</td>
+                 </tr>
+                <tr id="secondrow">
+                 <td>Three</td>
+                 <td>Four</td>
+                </tr>
+            </tbody>
+        </table> 
+        <br>
+    <div><br></div>
+    <div><br></div>
+</div>
+<script>
+if (window.layoutTestController)
+    window.layoutTestController.dumpAsText();
+indent = document.getElementById("secondrow");
+window.getSelection().setBaseAndExtent(document.getElementById('start'), 0, indent, 0);
+document.execCommand("indent");
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c6c3fc2..695498f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-12-04  Enrica Casucci  <enrica at apple.com>
+
+        Reviewed by John Sullivan.
+
+        Mail.app crashes when indenting table pasted from Numbers.app.
+        <rdar://problem/7209507>
+        https://bugs.webkit.org/show_bug.cgi?id=32166
+
+        Test: LayoutTests/editing/execCommand/indent-partial-table.html
+        
+        * editing/IndentOutdentCommand.cpp:
+        (WebCore::IndentOutdentCommand::indentRegion): Added test to verify that the end of the paragraph
+        after the selection has not been moved.
+
 2009-12-04  Alexey Proskuryakov  <ap at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/editing/IndentOutdentCommand.cpp b/WebCore/editing/IndentOutdentCommand.cpp
index 1098791..5e6f339 100644
--- a/WebCore/editing/IndentOutdentCommand.cpp
+++ b/WebCore/editing/IndentOutdentCommand.cpp
@@ -153,6 +153,12 @@ void IndentOutdentCommand::indentRegion(const VisiblePosition& startOfSelection,
             blockquoteForNextIndent = 0;
         else
             indentIntoBlockquote(endOfCurrentParagraph, endOfNextParagraph, blockquoteForNextIndent);
+
+        // indentIntoBlockquote could move more than one paragraph if the paragraph
+        // is in a list item or a table. As a result, endAfterSelection could refer to a position
+        // no longer in the document.
+        if (endAfterSelection.isNotNull() && !endAfterSelection.deepEquivalent().node()->inDocument())
+            break;
         // Sanity check: Make sure our moveParagraph calls didn't remove endOfNextParagraph.deepEquivalent().node()
         // If somehow we did, return to prevent crashes.
         if (endOfNextParagraph.isNotNull() && !endOfNextParagraph.deepEquivalent().node()->inDocument()) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list