Closed Bug 453521 Opened 16 years ago Closed 16 years ago

range.extractContents should return empty document fragment if range is collapsed

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

References

Details

Attachments

(1 file)

Currently we return null. Patch coming. With the patches for bug 302775 and bug 42976, ACID3 test7 is fixed.
Attached patch proposed patchSplinter Review
Assignee: nobody → Olli.Pettay
Status: NEW → ASSIGNED
Attachment #336712 - Flags: superreview?(jonas)
Attachment #336712 - Flags: review?(jonas)
Comment on attachment 336712 [details] [diff] [review] proposed patch >- return CollapseRangeAfterDelete(this); >+ rv = CollapseRangeAfterDelete(this); >+ if (NS_SUCCEEDED(rv) && aFragment) { >+ NS_ADDREF(*aFragment = retval); >+ } >+ return rv; The following is somewhat easier to read and would translate better if we ever switch to real exceptions: rv = CollapseRangeAfterDelete(this); NS_ENSURE_SUCCESS(rv, rv); if (aFragment) { NS_ADDREF(*aFragment = retval); } return NS_OK; Up to you
Attachment #336712 - Flags: superreview?(jonas)
Attachment #336712 - Flags: superreview+
Attachment #336712 - Flags: review?(jonas)
Attachment #336712 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: