diff --git a/dom/base/nsDocumentEncoder.cpp b/dom/base/nsDocumentEncoder.cpp index 789fd34301f8..ad35b4d013a6 100644 --- a/dom/base/nsDocumentEncoder.cpp +++ b/dom/base/nsDocumentEncoder.cpp @@ -623,7 +623,7 @@ nsresult nsDocumentEncoder::SerializeRangeNodes(nsRange* aRange, nsINode* aNode, } } - if (endOffset) { + if (startOffset < endOffset) { // serialize the children of this node that are in the range nsIContent* childAsNode = content->GetFirstChild(); int32_t j = 0; diff --git a/dom/svg/test/test_text_selection.html b/dom/svg/test/test_text_selection.html index 4db8c1181dc7..3eb75fbaefd8 100644 --- a/dom/svg/test/test_text_selection.html +++ b/dom/svg/test/test_text_selection.html @@ -17,7 +17,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=655877 -
+
+
+
+
+This is part of the test + -