Closed Bug 539239 Opened 15 years ago Closed 14 years ago

Pass correct document to ReparentContentWrapper

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch v1 (obsolete) — Splinter Review
This looks like fallout from bug 418755, when we changed back from throwing WRONG_DOCUMENT_ERR to implicitly adopting we didn't revert to using the owner document of the original document as the "old" document for reparenting wrappers. I also removed an unused argument.
Attachment #421271 - Flags: review?(jst)
Attached patch v1 (obsolete) — Splinter Review
Wrong patch.
Attachment #421271 - Attachment is obsolete: true
Attachment #421272 - Flags: review?(jst)
Attachment #421271 - Flags: review?(jst)
Attachment #421272 - Flags: review?(jst) → review+
Attached patch v2Splinter Review
I realized we can actually remove this call to ReparentContentWrapper. If the node is inserted into a different document we'll adopt it first, which does the reparenting. We still need to reparent for XUL nodes and form controls, I think there's a bug about that but can't find it right now.
Attachment #421272 - Attachment is obsolete: true
Attachment #422217 - Flags: review?(jst)
Comment on attachment 422217 [details] [diff] [review]
v2

-    if (!newContent->IsXUL()) {
-      nsContentUtils::ReparentContentWrapper(newContent, aParent,
-                                             container->GetOwnerDoc(),
-                                             container->GetOwnerDoc());
-    }
+    // FIXME We need to reparent here for nodes for which the parent of their
+    //       wrapper is not the wrapper for their ownerDocument (XUL elements,
+    //       form controls, ...).

Is there a bug on file for doing this?
Attachment #422217 - Flags: review?(jst) → review+
(In reply to comment #3)
> Is there a bug on file for doing this?

I thought there was, but I can't find it. If filed bug 544654.
http://hg.mozilla.org/mozilla-central/rev/794c61af2b5a
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: