Fix for 43248. r=ben,a=waterson

This commit is contained in:
hyatt%netscape.com 2000-10-10 20:52:25 +00:00
parent 032e7132f4
commit f680e4d243
4 changed files with 42 additions and 12 deletions

View File

@ -470,6 +470,17 @@ nsXBLPrototypeBinding::GetSingleInsertionPoint(nsIContent* aBoundElement,
GetImmediateChild(kContentAtom, getter_AddRefs(templContent));
LocateInstance(templContent, aCopyRoot, content, getter_AddRefs(realContent));
}
else {
// The only insertion point specified was actually a filtered insertion point.
// This means (strictly speaking) that we actually have multiple insertion
// points: the filtered one and a generic insertion point (content that doesn't
// match the filter will just go right underneath the bound element).
*aMultipleInsertionPoints = PR_TRUE;
*aResult = nsnull;
return NS_OK;
}
*aMultipleInsertionPoints = PR_FALSE;
if (realContent)
*aResult = realContent;
else

View File

@ -346,9 +346,11 @@ nsXBLStreamListener::Load(nsIDOMEvent* aEvent)
// If the doc is a chrome URI, then we put it into the XUL cache.
PRBool cached = PR_FALSE;
if (IsChromeURI(uri) && gXULUtils->UseXULCache()) {
cached = PR_TRUE;
gXULCache->PutXBLDocumentInfo(info);
if (IsChromeURI(uri)) {
if (gXULUtils && gXULUtils->UseXULCache()) {
cached = PR_TRUE;
gXULCache->PutXBLDocumentInfo(info);
}
// Cache whether or not this chrome XBL can execute scripts.
nsCOMPtr<nsIChromeRegistry> reg(do_GetService(kChromeRegistryCID, &rv));
@ -1095,9 +1097,11 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB
// If the doc is a chrome URI, then we put it into the XUL cache.
PRBool cached = PR_FALSE;
if (IsChromeURI(uri) && gXULUtils && gXULUtils->UseXULCache()) {
cached = PR_TRUE;
gXULCache->PutXBLDocumentInfo(info);
if (IsChromeURI(uri)) {
if (gXULUtils && gXULUtils->UseXULCache()) {
cached = PR_TRUE;
gXULCache->PutXBLDocumentInfo(info);
}
// Cache whether or not this chrome XBL can execute scripts.
nsCOMPtr<nsIChromeRegistry> reg(do_GetService(kChromeRegistryCID, &rv));

View File

@ -470,6 +470,17 @@ nsXBLPrototypeBinding::GetSingleInsertionPoint(nsIContent* aBoundElement,
GetImmediateChild(kContentAtom, getter_AddRefs(templContent));
LocateInstance(templContent, aCopyRoot, content, getter_AddRefs(realContent));
}
else {
// The only insertion point specified was actually a filtered insertion point.
// This means (strictly speaking) that we actually have multiple insertion
// points: the filtered one and a generic insertion point (content that doesn't
// match the filter will just go right underneath the bound element).
*aMultipleInsertionPoints = PR_TRUE;
*aResult = nsnull;
return NS_OK;
}
*aMultipleInsertionPoints = PR_FALSE;
if (realContent)
*aResult = realContent;
else

View File

@ -346,9 +346,11 @@ nsXBLStreamListener::Load(nsIDOMEvent* aEvent)
// If the doc is a chrome URI, then we put it into the XUL cache.
PRBool cached = PR_FALSE;
if (IsChromeURI(uri) && gXULUtils->UseXULCache()) {
cached = PR_TRUE;
gXULCache->PutXBLDocumentInfo(info);
if (IsChromeURI(uri)) {
if (gXULUtils && gXULUtils->UseXULCache()) {
cached = PR_TRUE;
gXULCache->PutXBLDocumentInfo(info);
}
// Cache whether or not this chrome XBL can execute scripts.
nsCOMPtr<nsIChromeRegistry> reg(do_GetService(kChromeRegistryCID, &rv));
@ -1095,9 +1097,11 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB
// If the doc is a chrome URI, then we put it into the XUL cache.
PRBool cached = PR_FALSE;
if (IsChromeURI(uri) && gXULUtils && gXULUtils->UseXULCache()) {
cached = PR_TRUE;
gXULCache->PutXBLDocumentInfo(info);
if (IsChromeURI(uri)) {
if (gXULUtils && gXULUtils->UseXULCache()) {
cached = PR_TRUE;
gXULCache->PutXBLDocumentInfo(info);
}
// Cache whether or not this chrome XBL can execute scripts.
nsCOMPtr<nsIChromeRegistry> reg(do_GetService(kChromeRegistryCID, &rv));