Bug 21060

Summary: Range#surroundContents incorrectly throws BAD_BOUNDARYPOINTS_ERR
Product: WebKit Reporter: nanto_vi (TOYAMA Nao) <nanto>
Component: DOMAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cdumez, jparent, ojan
Priority: P2 Keywords: GoogleBug
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Testcase 1
none
proposed fix mjs: review+

Description nanto_vi (TOYAMA Nao) 2008-09-24 08:53:16 PDT
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
Comment 1 nanto_vi (TOYAMA Nao) 2008-09-24 08:55:03 PDT
Created attachment 23751 [details]
Testcase 1

Firefox and Opera works fine but Safari doesn't.
Comment 2 Alexey Proskuryakov 2008-10-29 03:58:46 PDT
Confirmed with r37970.
Comment 3 Alexey Proskuryakov 2008-11-05 03:19:07 PST
Created attachment 24907 [details]
proposed fix
Comment 4 Maciej Stachowiak 2008-11-05 07:57:10 PST
Comment on attachment 24907 [details]
proposed fix

r=me
Comment 5 Alexey Proskuryakov 2008-11-05 11:19:39 PST
Committed revision 38132.

Comment 6 Lucas Forschler 2019-02-06 09:03:24 PST
Mass moving XML DOM bugs to the "DOM" Component.