RESOLVED FIXED 11833
ASSERTION FAILURE calling SelectionController::setBaseAndExtent
https://bugs.webkit.org/show_bug.cgi?id=11833
Summary ASSERTION FAILURE calling SelectionController::setBaseAndExtent
Geoffrey Garen
Reported 2006-12-14 15:48:15 PST
ASSERTION FAILED: !s.base().node() || s.base().node()->document() == m_frame->document() (/Users/ggaren/Labyrinth/OpenSource/WebCore/editing/SelectionController.cpp:107 void WebCore::SelectionController::setSelection(const WebCore::Selection&, bool, bool, bool)) Program received signal: "EXC_BAD_ACCESS". Here's the reduction: <iframe src="data:text/html, <div id='test' contenteditable='true'>hello world</div>"></iframe> <script> window.onload = function() { var div = frames[0].document.getElementById('test'); getSelection().setBaseAndExtent(div, 0, div, 1); } </script>
Attachments
Mark Rowe (bdash)
Comment 1 2007-01-28 16:15:41 PST
Justin Garcia
Comment 2 2007-01-29 14:53:38 PST
You're setting the wrong frame's selection. You want to: frames[0].getSelection().setBaseAndExtent(...) But we probably shouldn't ASSERT. Maybe we should try to set the right frame's selection if the user does this.
Justin Garcia
Comment 3 2007-01-29 17:33:10 PST
Note You need to log in before you can comment on or make changes to this bug.