[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 13:18:17 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 064213e007f4cf3c44f5d47e15ff1c688a1da622
Author: rniwa at webkit.org <rniwa at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Sep 10 19:40:43 2010 +0000

    2010-09-10  Ryosuke Niwa  <rniwa at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            REGRESSION(r67176): editing/selection/doubleclick-inline-first-last-contenteditable.html crashes
            https://bugs.webkit.org/show_bug.cgi?id=45525
    
            The crash was caused by ancestorToRetainStructureAndAppearance not taking into consideration
            the case where there is no common block ancestor. Fixed this by adding a null check.
    
            Test: editing/pasteboard/copy-without-common-block-crash.html
    
            * editing/markup.cpp:
            (WebCore::ancestorToRetainStructureAndAppearance): Added a null check.
    2010-09-10  Ryosuke Niwa  <rniwa at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            REGRESSION(r67176): editing/selection/doubleclick-inline-first-last-contenteditable.html crashes
            https://bugs.webkit.org/show_bug.cgi?id=45525
    
            Added a test to ensure WebKit does not crash when copying a region that doesn't have any common block ancestor.
            Also removed doubleclick-inline-first-last-contenteditable.html from the qt's skipped list since
            this test should not crash anymore.
    
            * editing/pasteboard/copy-without-common-block-crash-expected.txt: Added.
            * editing/pasteboard/copy-without-common-block-crash.html: Added.
            * platform/qt/Skipped: Removed doubleclick-inline-first-last-contenteditable.html from the list.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67221 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 379342c..bfaa4fa 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-10  Ryosuke Niwa  <rniwa at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        REGRESSION(r67176): editing/selection/doubleclick-inline-first-last-contenteditable.html crashes
+        https://bugs.webkit.org/show_bug.cgi?id=45525
+
+        Added a test to ensure WebKit does not crash when copying a region that doesn't have any common block ancestor.
+        Also removed doubleclick-inline-first-last-contenteditable.html from the qt's skipped list since
+        this test should not crash anymore.
+
+        * editing/pasteboard/copy-without-common-block-crash-expected.txt: Added.
+        * editing/pasteboard/copy-without-common-block-crash.html: Added.
+        * platform/qt/Skipped: Removed doubleclick-inline-first-last-contenteditable.html from the list.
+
 2010-09-10  Adam Roben  <aroben at apple.com>
 
         Land new expected results for some tests on Windows
diff --git a/LayoutTests/editing/pasteboard/copy-without-common-block-crash-expected.txt b/LayoutTests/editing/pasteboard/copy-without-common-block-crash-expected.txt
new file mode 100644
index 0000000..b1b61df
--- /dev/null
+++ b/LayoutTests/editing/pasteboard/copy-without-common-block-crash-expected.txt
@@ -0,0 +1,3 @@
+This tests crash when copying a text without a common ancestor block. To manually test, copy "hello" below and WebKit should not crash. On DRT, you should see PASS below.
+
+PASS
diff --git a/LayoutTests/editing/pasteboard/copy-without-common-block-crash.html b/LayoutTests/editing/pasteboard/copy-without-common-block-crash.html
new file mode 100644
index 0000000..21c078f
--- /dev/null
+++ b/LayoutTests/editing/pasteboard/copy-without-common-block-crash.html
@@ -0,0 +1,18 @@
+<html>
+<body>
+<p>This tests crash when copying a text without a common ancestor block. To manually test, copy "hello" below and WebKit should not crash. On DRT, you should see PASS below.</p>
+<span id="test" contenteditable>hello</span>
+<script type="text/javascript">
+
+if (window.layoutTestController)
+    window.layoutTestController.dumpAsText();
+
+var test = document.getElementById('test');
+document.getSelection().selectAllChildren(test);
+document.execCommand('copy');
+
+test.innerHTML = 'PASS';
+
+</script>
+</body>
+</html>
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index d7ac0de..2c3f4c8 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5449,6 +5449,3 @@ fullscreen/
 
 # https://bugs.webkit.org/show_bug.cgi?id=45194
 fast/text/decomposed-after-stacked-diacritics.html
-
-# https://bugs.webkit.org/show_bug.cgi?id=45525
-editing/selection/doubleclick-inline-first-last-contenteditable.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f6d251e..07f23ca 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-10  Ryosuke Niwa  <rniwa at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        REGRESSION(r67176): editing/selection/doubleclick-inline-first-last-contenteditable.html crashes
+        https://bugs.webkit.org/show_bug.cgi?id=45525
+
+        The crash was caused by ancestorToRetainStructureAndAppearance not taking into consideration
+        the case where there is no common block ancestor. Fixed this by adding a null check.
+
+        Test: editing/pasteboard/copy-without-common-block-crash.html
+
+        * editing/markup.cpp:
+        (WebCore::ancestorToRetainStructureAndAppearance): Added a null check.
+
 2010-09-09  Kinuko Yasuda  <kinuko at chromium.org>
 
         Reviewed by Dumitru Daniliuc.
diff --git a/WebCore/editing/markup.cpp b/WebCore/editing/markup.cpp
index d4996ea..0dc029a 100644
--- a/WebCore/editing/markup.cpp
+++ b/WebCore/editing/markup.cpp
@@ -896,6 +896,9 @@ static Node* ancestorToRetainStructureAndAppearance(Node* commonAncestor)
 {
     Node* commonAncestorBlock = enclosingBlock(commonAncestor);
 
+    if (!commonAncestorBlock)
+        return 0;
+
     if (commonAncestorBlock->hasTagName(tbodyTag) || commonAncestorBlock->hasTagName(trTag)) {
         Node* table = commonAncestorBlock->parentNode();
         while (table && !table->hasTagName(tableTag))

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list