[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:41:05 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 3658acea538c0da7d400c3d266e08490f170d38f
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri May 21 16:42:54 2004 +0000
Reviewed by Ken.
- fixed part of <rdar://problem/3656948>: (HTML Editing: -[WebView replaceSelectionWithMarkupString:] doesn't seem to work)
* khtml/editing/htmlediting_impl.cpp: (khtml::PasteMarkupCommandImpl::doApply):
Changed code to handle case where contextual fragment parses to nothing without crashing.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 4ec1335..762e91d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -2,6 +2,15 @@
Reviewed by Ken.
+ - fixed part of <rdar://problem/3656948>: (HTML Editing: -[WebView replaceSelectionWithMarkupString:] doesn't seem to work)
+
+ * khtml/editing/htmlediting_impl.cpp: (khtml::PasteMarkupCommandImpl::doApply):
+ Changed code to handle case where contextual fragment parses to nothing without crashing.
+
+2004-05-21 Darin Adler <darin at apple.com>
+
+ Reviewed by Ken.
+
* kwq/DOM-CSS.mm: Change DOMCSSStyleDeclaration methods to use strings with dash-separators in them
rather than interCaps.
diff --git a/WebCore/khtml/editing/htmlediting_impl.cpp b/WebCore/khtml/editing/htmlediting_impl.cpp
index bc769af..d2156f7 100644
--- a/WebCore/khtml/editing/htmlediting_impl.cpp
+++ b/WebCore/khtml/editing/htmlediting_impl.cpp
@@ -1946,8 +1946,6 @@ void PasteMarkupCommandImpl::doApply()
NodeImpl *firstChild = root->firstChild();
NodeImpl *lastChild = root->lastChild();
- ASSERT(firstChild);
- ASSERT(lastChild);
Selection selection = endingSelection();
@@ -1960,7 +1958,10 @@ void PasteMarkupCommandImpl::doApply()
selection = endingSelection();
ASSERT(!selection.isEmpty());
- if (firstChild == lastChild && firstChild->isTextNode()) {
+ if (!firstChild) {
+ // Pasting something that didn't parse or was empty.
+ ASSERT(!lastChild);
+ } else if (firstChild == lastChild && firstChild->isTextNode()) {
// Simple text paste. Treat as if the text were typed.
inputText(static_cast<TextImpl *>(firstChild)->data());
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list