Fix for 73137. r=lumpy, sr=mozbot

This commit is contained in:
hyatt%netscape.com 2001-04-08 22:12:55 +00:00
Родитель 383a808d53
Коммит 842bc8982d
2 изменённых файлов: 44 добавлений и 2 удалений

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

@ -3395,6 +3395,13 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell,
if (NS_FAILED(rv))
return NS_OK; // Binding will load asynchronously.
if (binding) {
nsCOMPtr<nsIBindingManager> bm;
mDocument->GetBindingManager(getter_AddRefs(bm));
if (bm)
bm->AddToAttachedQueue(binding);
}
if (resolveStyle) {
nsCOMPtr<nsIAtom> tag;
aDocElement->GetTag(*getter_AddRefs(tag));
@ -5181,7 +5188,21 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
content->SetParent(aParent);
content->SetDocument(aDocument, PR_TRUE, PR_TRUE);
content->SetBindingParent(content);
#ifdef INCLUDE_XUL
// Only cut XUL scrollbars off if they're not in a XUL document. This allows
// scrollbars to be styled from XUL (although not from XML or HTML).
nsCOMPtr<nsIAtom> tag;
content->GetTag(*getter_AddRefs(tag));
if (tag.get() == nsXULAtoms::scrollbar) {
nsCOMPtr<nsIDOMXULDocument> xulDoc(do_QueryInterface(aDocument));
if (xulDoc)
content->SetBindingParent(aParent);
else content->SetBindingParent(content);
}
else
#endif
content->SetBindingParent(content);
nsIFrame * newFrame = nsnull;
nsresult rv = creator->CreateFrameFor(aPresContext, content, &newFrame);

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

@ -3395,6 +3395,13 @@ nsCSSFrameConstructor::ConstructDocElementFrame(nsIPresShell* aPresShell,
if (NS_FAILED(rv))
return NS_OK; // Binding will load asynchronously.
if (binding) {
nsCOMPtr<nsIBindingManager> bm;
mDocument->GetBindingManager(getter_AddRefs(bm));
if (bm)
bm->AddToAttachedQueue(binding);
}
if (resolveStyle) {
nsCOMPtr<nsIAtom> tag;
aDocElement->GetTag(*getter_AddRefs(tag));
@ -5181,7 +5188,21 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
content->SetParent(aParent);
content->SetDocument(aDocument, PR_TRUE, PR_TRUE);
content->SetBindingParent(content);
#ifdef INCLUDE_XUL
// Only cut XUL scrollbars off if they're not in a XUL document. This allows
// scrollbars to be styled from XUL (although not from XML or HTML).
nsCOMPtr<nsIAtom> tag;
content->GetTag(*getter_AddRefs(tag));
if (tag.get() == nsXULAtoms::scrollbar) {
nsCOMPtr<nsIDOMXULDocument> xulDoc(do_QueryInterface(aDocument));
if (xulDoc)
content->SetBindingParent(aParent);
else content->SetBindingParent(content);
}
else
#endif
content->SetBindingParent(content);
nsIFrame * newFrame = nsnull;
nsresult rv = creator->CreateFrameFor(aPresContext, content, &newFrame);