Fix for this bug:
<rdar://problem/
3834779> Mail crashes when editing HTML message - khtml::Selection::layout()
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::styleForSelectionStart): Table code seems to be more robust when the call to
insert our style-checking node is done with an appendChild rather than an insertBefore. Note
that this table-related problem was exposed by fixing Selection::layout(), which I did
yesterday. This change simply improves things even more so that we do not crash in the
scenario described in the bug.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7819
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2004-10-12 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by Hyatt
+
+ Fix for this bug:
+
+ <rdar://problem/3834779> Mail crashes when editing HTML message - khtml::Selection::layout()
+
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::styleForSelectionStart): Table code seems to be more robust when the call to
+ insert our style-checking node is done with an appendChild rather than an insertBefore. Note
+ that this table-related problem was exposed by fixing Selection::layout(), which I did
+ yesterday. This change simply improves things even more so that we do not crash in the
+ scenario described in the bug.
+
2004-10-11 Ken Kocienda <kocienda@apple.com>
Reviewed by John
styleElement->appendChild(text, exceptionCode);
ASSERT(exceptionCode == 0);
- node->parentNode()->insertBefore(styleElement, node, exceptionCode);
+ node->parentNode()->appendChild(styleElement, exceptionCode);
ASSERT(exceptionCode == 0);
nodeToRemove = styleElement;