LayoutTests:
[WebKit-https.git] / WebCore / editing / DeleteSelectionCommand.cpp
index 5e8f6a6ed05b53ad30c7930ed4240b87f72739b8..aab99e3a305c9dbfc380717e7906ae6e3fe8525f 100644 (file)
@@ -86,7 +86,7 @@ void DeleteSelectionCommand::initializeStartEnd()
     else if (end.node()->hasTagName(hrTag))
         end = Position(end.node(), 1);
     
-    while (1) {
+    while (VisiblePosition(start) == m_selectionToDelete.visibleStart() && VisiblePosition(end) == m_selectionToDelete.visibleEnd()) {
         startSpecialContainer = 0;
         endSpecialContainer = 0;