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.
BAD_BOUNDARYPOINTS_ERR is thrown.
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
Created attachment 23751 [details]
Firefox and Opera works fine but Safari doesn't.
Confirmed with r37970.
Created attachment 24907 [details]
Comment on attachment 24907 [details]
Committed revision 38132.
Mass moving XML DOM bugs to the "DOM" Component.