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

ojan at chromium.org ojan at chromium.org
Wed Dec 22 11:28:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5ba521ec6a8bfdf2cafa38bc3b27e9a159e0b169
Author: ojan at chromium.org <ojan at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jul 26 18:28:41 2010 +0000

    2010-07-23  Ojan Vafai  <ojan at chromium.org>
    
            Reviewed by Darin Adler.
    
            crash in insertParagraph in a contentEditable list
            https://bugs.webkit.org/show_bug.cgi?id=42919
    
            * editing/execCommand/crash-on-enter-in-contentEditable-list-expected.txt: Added.
            * editing/execCommand/crash-on-enter-in-contentEditable-list.html: Added.
    2010-07-23  Ojan Vafai  <ojan at chromium.org>
    
            Reviewed by Darin Adler.
    
            crash in insertParagraph in a contentEditable list
            https://bugs.webkit.org/show_bug.cgi?id=42919
    
            Don't try to break out of a list item if the list it's in
            is the rootEditableElement.
    
            * editing/CompositeEditCommand.cpp:
            (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64056 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c3ebf41..cdb8e9b 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-23  Ojan Vafai  <ojan at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        crash in insertParagraph in a contentEditable list
+        https://bugs.webkit.org/show_bug.cgi?id=42919
+
+        * editing/execCommand/crash-on-enter-in-contentEditable-list-expected.txt: Added.
+        * editing/execCommand/crash-on-enter-in-contentEditable-list.html: Added.
+
 2010-07-26  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Ojan Vafai.
diff --git a/LayoutTests/editing/execCommand/crash-on-enter-in-contentEditable-list-expected.txt b/LayoutTests/editing/execCommand/crash-on-enter-in-contentEditable-list-expected.txt
new file mode 100644
index 0000000..d6c06e6
--- /dev/null
+++ b/LayoutTests/editing/execCommand/crash-on-enter-in-contentEditable-list-expected.txt
@@ -0,0 +1,34 @@
+
+<HTML>
+<HEAD>
+<SCRIPT src="../../resources/dump-as-markup.js"></SCRIPT>
+<#text>
+</#text>
+</HEAD>
+<BODY>
+<DIV>
+<#text>This test passes if it doesn't crash.</#text>
+</DIV>
+<#text>
+</#text>
+<UL contentEditable="">
+<#text>
+</#text>
+<LI id="foo">
+</LI>
+<LI id="foo"><selection-caret>
+<BR>
+</LI>
+<#text>
+</#text>
+</UL>
+<#text>
+</#text>
+<SCRIPT>
+window.getSelection().selectAllChildren(foo);
+document.execCommand('insertParagraph');
+</SCRIPT>
+<#text>
+</#text>
+</BODY>
+</HTML>
diff --git a/LayoutTests/editing/execCommand/crash-on-enter-in-contentEditable-list.html b/LayoutTests/editing/execCommand/crash-on-enter-in-contentEditable-list.html
new file mode 100644
index 0000000..5e21e70
--- /dev/null
+++ b/LayoutTests/editing/execCommand/crash-on-enter-in-contentEditable-list.html
@@ -0,0 +1,9 @@
+<script src="../../resources/dump-as-markup.js"></script>
+<div>This test passes if it doesn't crash.</div>
+<ul contentEditable>
+    <li id=foo></li>
+</ul>
+<script>
+window.getSelection().selectAllChildren(foo);
+document.execCommand('insertParagraph');
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d710585..5aa96ee 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-07-23  Ojan Vafai  <ojan at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        crash in insertParagraph in a contentEditable list
+        https://bugs.webkit.org/show_bug.cgi?id=42919
+
+        Don't try to break out of a list item if the list it's in
+        is the rootEditableElement.
+
+        * editing/CompositeEditCommand.cpp:
+        (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
+
 2010-07-26  Marcus Bulach  <bulach at chromium.org>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebCore/editing/CompositeEditCommand.cpp b/WebCore/editing/CompositeEditCommand.cpp
index 41d6758..c5a8959 100644
--- a/WebCore/editing/CompositeEditCommand.cpp
+++ b/WebCore/editing/CompositeEditCommand.cpp
@@ -1009,7 +1009,8 @@ bool CompositeEditCommand::breakOutOfEmptyListItem()
     // FIXME: Can't we do something better when the immediate parent wasn't a list node?
     if (!listNode
         || (!listNode->hasTagName(ulTag) && !listNode->hasTagName(olTag))
-        || !listNode->isContentEditable())
+        || !listNode->isContentEditable()
+        || listNode == emptyListItem->rootEditableElement())
         return false;
 
     RefPtr<Element> newBlock = 0;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list