Bug 21060 - Range#surroundContents incorrectly throws BAD_BOUNDARYPOINTS_ERR
Summary: Range#surroundContents incorrectly throws BAD_BOUNDARYPOINTS_ERR
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: GoogleBug
Depends on:
Blocks:
 
Reported: 2008-09-24 08:53 PDT by nanto_vi (TOYAMA Nao)
Modified: 2019-02-06 09:03 PST (History)
4 users (show)

See Also:


Attachments
Testcase 1 (697 bytes, text/html)
2008-09-24 08:55 PDT, nanto_vi (TOYAMA Nao)
no flags Details
proposed fix (5.75 KB, patch)
2008-11-05 03:19 PST, Alexey Proskuryakov
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.