The surroundContents method of a range can throw BAD_BOUNDARYPOINTS_ERR when the container node of its boundary point is an element node, even if the range contains no partially selected node. See the attachment. Actual: BAD_BOUNDARYPOINTS_ERR is thrown. Expected: The em element is surrounded by the strong element. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/528+ (KHTML, like Gecko) Version/4.0 Safari/528.1.1 WebKit-r36766
Created attachment 23751 [details] Testcase 1 Firefox and Opera works fine but Safari doesn't.
Confirmed with r37970.
Created attachment 24907 [details] proposed fix
Comment on attachment 24907 [details] proposed fix r=me
Committed revision 38132.
Mass moving XML DOM bugs to the "DOM" Component.