Reviewed by darin.
* khtml/editing/visible_units.cpp:
(khtml::endOfParagraph): don't consider text nodes that have no rendered characters
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8786
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-03-04 Chris Blumenberg <cblu@apple.com>
+
+ Fixed: <rdar://problem/4032840> REGRESSION (Mail): crash in RemoveNodeCommand after pasting attachment at end of message
+
+ Reviewed by darin.
+
+ * khtml/editing/visible_units.cpp:
+ (khtml::endOfParagraph): don't consider text nodes that have no rendered characters
+
2005-03-04 Richard Williamson <rjw@apple.com>
Fixed <rdar://problem/4034764> REGRESSION(125-188)Viewing text/plain page and going back/forward corrupts HTML pages (google.com)
return VisiblePosition(n, 0, DOWNSTREAM);
break;
}
- if (r->isText()) {
+ // FIXME: We avoid returning a position where the renderer can't accept the caret.
+ // We should probably do this in other cases such as startOfParagraph.
+ if (r->isText() && r->caretMaxRenderedOffset() > 0) {
if (includeLineBreak && !n->isAncestor(startBlock))
return VisiblePosition(n, 0, DOWNSTREAM);
long length = static_cast<RenderText *>(r)->length();