Fix crash on having a <xul:listbox> in a plain XML document. Bug 197234,

r=sicking, sr=jst
This commit is contained in:
bzbarsky%mit.edu 2003-03-18 21:18:26 +00:00
Родитель af36ee745c
Коммит 596066a1d9
4 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -2802,10 +2802,12 @@ nsDocument::GetBoxObjectFor(nsIDOMElement* aElement, nsIBoxObject** aResult)
else if (tag.get() == nsXULAtoms::popup || tag.get() == nsXULAtoms::menupopup ||
tag.get() == nsXULAtoms::tooltip)
contractID += "-popup";
else if (tag.get() == nsXULAtoms::scrollbox)
contractID += "-scrollbox";
else if (tag.get() == nsXULAtoms::tree)
contractID += "-tree";
else if (tag.get() == nsXULAtoms::listbox)
contractID += "-listbox";
else if (tag.get() == nsXULAtoms::scrollbox)
contractID += "-scrollbox";
}
contractID += ";1";

Просмотреть файл

@ -6763,8 +6763,6 @@ nsXULDocument::GetBoxObjectFor(nsIDOMElement* aElement, nsIBoxObject** aResult)
contractID += "-listbox";
else if (tag.get() == nsXULAtoms::scrollbox)
contractID += "-scrollbox";
else if (tag.get() == nsXULAtoms::tree)
contractID += "-tree";
}
contractID += ";1";

Просмотреть файл

@ -9009,7 +9009,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
nsIListBoxObject* bodyBoxObject = nsnull;
listBoxObject->GetListboxBody(&bodyBoxObject);
nsListBoxBodyFrame* listBoxBody = NS_STATIC_CAST(nsListBoxBodyFrame*, bodyBoxObject);
NS_RELEASE(bodyBoxObject);
NS_IF_RELEASE(bodyBoxObject);
if (listBoxBody)
listBoxBody->OnContentInserted(aPresContext, aChild);
}

Просмотреть файл

@ -9009,7 +9009,7 @@ nsCSSFrameConstructor::ContentInserted(nsIPresContext* aPresContext,
nsIListBoxObject* bodyBoxObject = nsnull;
listBoxObject->GetListboxBody(&bodyBoxObject);
nsListBoxBodyFrame* listBoxBody = NS_STATIC_CAST(nsListBoxBodyFrame*, bodyBoxObject);
NS_RELEASE(bodyBoxObject);
NS_IF_RELEASE(bodyBoxObject);
if (listBoxBody)
listBoxBody->OnContentInserted(aPresContext, aChild);
}