When nodes with no matching insertion point are inserted, binding content isn't dropped

NEW
Unassigned

Status

()

10 years ago
8 years ago

People

(Reporter: bzbarsky, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

10 years ago
If a node with a binding has a child and the binding has no insertion point for that child, the binding's content is dropped.

But if such a child is inserted dynamically, we leave the binding content in place (and in fact don't show the new child if it was added at the end, and shows it in the wrong place if it's added somewhere else; the fix for bug 307394 will change the wrong place but it will still be wrong).

This is all pretty broken, in my opinion.  The question is whether we can fix it without breaking various XUL stuff...

Neil, Neil, Jonas, thoughts?  Last I checked the content-dropping lived in a really silly place in initial content setup, so this isn't really all that straightforward to do either.  :(
(Reporter)

Comment 1

10 years ago
Created attachment 357696 [details]
reference
(Reporter)

Comment 2

10 years ago
Created attachment 357697 [details]
Reftest 1
(Reporter)

Comment 3

10 years ago
Created attachment 357698 [details]
Reftest 2
I'm not really eager to mess around with this unless it's a regression or unless there is frontend (firefox or otherwise) that is held back by this.
(Reporter)

Comment 5

10 years ago
Once this is fixed we might be able to assert in the seek(nsIContent*) method in nsChildIterator.h that I'm adding in bug 307394.
(Reporter)

Comment 6

10 years ago
Oh, sure.  I just ran into it because it triggered asserts I thought I could add...

Note that I will be changing the ContentAppended behavior to be more like ContentInserted in bug 307394.
You need to log in before you can comment on or make changes to this bug.