Multiple Layout Tests (e.g. fast/repaint/japanese-rl-selection-clear.html) is failing...
[WebKit-https.git] / Source / WebCore / loader / FrameLoader.cpp
index cc5696c..cd7feae 100644 (file)
@@ -570,7 +570,7 @@ void FrameLoader::clear(Document* newDocument, bool clearWindowProperties, bool
         m_frame->script()->clearWindowShell(newDocument->domWindow(), m_frame->document()->inPageCache());
     }
 
-    m_frame->selection()->clear();
+    m_frame->selection()->prepareForDestruction();
     m_frame->eventHandler()->clear();
     if (clearFrameView && m_frame->view())
         m_frame->view()->clear();