Fix leak on hovering over a scrollbar and re-fix similar leak for text inputs (bug 42895) by adding a "general" method for unrooting anonymous content created through nsIAnonymousContentCreator, plus a hack to deal with the scrollbars on the root element. Some of the other SetDocumentForAnonymousContent methods *may* need to be implemented. Chris Waterson helped significantly with this patch. r=waterson,hyatt b=45676 (nsbeta3+)

This commit is contained in:
dbaron@fas.harvard.edu
2000-08-09 12:51:05 +00:00
parent becd14e896
commit d0e6838ec2
30 changed files with 329 additions and 86 deletions

View File

@@ -5350,9 +5350,16 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
return NS_OK;
}
}
// if we have no anonymous content from XBL see if we have some from these tags.
// only these tags types can have anonymous content. We do this check for performance
// reasons. If we did a query interface on every tag it would be very inefficient.
// If we have no anonymous content from XBL see if we might have
// some by looking at the tag rather than doing a QueryInterface on
// the frame. Only these tags' frames can have anonymous content
// through nsIAnonymousContentCreator. We do this check for
// performance reasons. If we did a QueryInterface on every tag it
// would be inefficient.
// nsGenericElement::SetDocument ought to keep a list like this one,
// but it can't because nsGfxScrollFrames get around this.
if (aTag != nsHTMLAtoms::input &&
aTag != nsHTMLAtoms::textarea &&
aTag != nsHTMLAtoms::combobox &&