[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:38:07 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit d324fde70519548d1186ce3b346399124bac63fd
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon May 3 22:54:25 2004 +0000
Reviewed by Hyatt
Nifty hack to work around problem where BR's inserted at the end of a block do not
render. Since only the *last* BR has this quirk, insert two when at the end of a block.
Once done, you can't caret past the last one, so you never insert two again.
* khtml/editing/htmlediting_impl.cpp:
(InputNewlineCommandImpl::doApply)
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6533 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 64bf7d8..4bf29cf 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,14 @@
+2004-05-03 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Hyatt
+
+ Nifty hack to work around problem where BR's inserted at the end of a block do not
+ render. Since only the *last* BR has this quirk, insert two when at the end of a block.
+ Once done, you can't caret past the last one, so you never insert two again.
+
+ * khtml/editing/htmlediting_impl.cpp:
+ (InputNewlineCommandImpl::doApply)
+
2004-05-03 Darin Adler <darin at apple.com>
Reviewed by Ken
diff --git a/WebCore/khtml/editing/htmlediting_impl.cpp b/WebCore/khtml/editing/htmlediting_impl.cpp
index 376f0f7..47449e2 100644
--- a/WebCore/khtml/editing/htmlediting_impl.cpp
+++ b/WebCore/khtml/editing/htmlediting_impl.cpp
@@ -1092,13 +1092,17 @@ void InputNewlineCommandImpl::doApply()
if (atEndOfBlock) {
LOG(Editing, "input newline case 1");
- appendNode(pos.node()->containingEditableBlock(), breakNode);
- // EDIT FIXME: This should not insert a non-breaking space after the BR.
- // But for right now, it gets the BR to render.
- TextImpl *editingTextNode = document()->createEditingTextNode(nonBreakingSpaceString());
- insertNodeAfter(editingTextNode, breakNode);
- setEndingSelection(Position(editingTextNode, 1));
- editingTextNode->deref();
+ NodeImpl *cb = pos.node()->containingEditableBlock();
+ appendNode(cb, breakNode);
+
+ // Insert an "extra" BR at the end of the block. This makes the "real" BR we want
+ // to insert appear in the rendering without any significant side effects (and no
+ // real worries either since you can't arrow past this extra one.
+ exceptionCode = 0;
+ ElementImpl *extraBreakNode = document()->createHTMLElement("BR", exceptionCode);
+ ASSERT(exceptionCode == 0);
+ appendNode(cb, extraBreakNode);
+ setEndingSelection(Position(extraBreakNode, 0));
}
else if (atEnd) {
LOG(Editing, "input newline case 2");
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list