Closed Bug 106212 Opened 23 years ago Closed 23 years ago

Make ContentAppended really work with XBL insertion points

Categories

(Core :: XBL, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.6

People

(Reporter: hyatt, Assigned: hyatt)

References

Details

Attachments

(1 file, 1 obsolete file)

The following patch makes ContentAppended kick ass with XBL insertion points. I finally ran into a XUL use case where I needed this fixed (go tab browser!). Right now ContentAppended completely screws up if the insertion point contains a mixture of content. With this patch, it works nearly all of the time.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.6
Attached patch Fix up most of the problems. (obsolete) — Splinter Review
Attachment #54652 - Attachment is obsolete: true
Comment on attachment 54654 [details] [diff] [review] Ye Olde Patch Demonstrating the Mightiness of My Insertion Point Fu Looks good; sr=waterson
Attachment #54654 - Flags: superreview+
*** Bug 99543 has been marked as a duplicate of this bug. ***
Comment on attachment 54654 [details] [diff] [review] Ye Olde Patch Demonstrating the Mightiness of My Insertion Point Fu - for (PRInt32 i = mObservers.Count() - 1; i >= 0; --i) { + for (PRInt32 i = 0; i < mObservers.Count(); i++) { I bet the compiler has to reload mImpl, test non-null, if so reload mImpl->mCount every time through the loop. Better to store mObservers.Count() in a local PRInt32 n and loop while i < n. Also, declare i outside of the for loop control (same goes for the later, inner-block for loop). Style nit: isn't it better to indent the condition and update to line up with the for loop's init part (so as to underhang in the column after the opening paren)? + for (ChildIterator::Init(insertionContent, &iter, &last); + iter != last; + ++iter) { Otherwise looks good -- do something about those for loops and r=brendan@mozilla.org /be
Attachment #54654 - Flags: review+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Built on linux from cvs shortly before this checkin: all was well. But right now it crashes. Mailed Hyatt backtrace from a non-debug.
Connection to Bug 106646 ?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: