Closed
Bug 106212
Opened 23 years ago
Closed 23 years ago
Make ContentAppended really work with XBL insertion points
Categories
(Core :: XBL, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.6
People
(Reporter: hyatt, Assigned: hyatt)
References
Details
Attachments
(1 file, 1 obsolete file)
11.30 KB,
patch
|
brendan
:
review+
waterson
:
superreview+
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.6
Assignee | ||
Comment 1•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Attachment #54652 -
Attachment is obsolete: true
Assignee | ||
Comment 2•23 years ago
|
||
Comment 3•23 years ago
|
||
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+
Comment 5•23 years ago
|
||
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+
Assignee | ||
Comment 6•23 years ago
|
||
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.
Comment 8•23 years ago
|
||
Connection to Bug 106646 ?
You need to log in
before you can comment on or make changes to this bug.
Description
•