This commit is contained in:
hyatt%netscape.com 2000-08-25 00:19:38 +00:00
Родитель b8a1340749
Коммит 83a557be58
4 изменённых файлов: 40 добавлений и 0 удалений

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

@ -629,6 +629,18 @@ nsBindingManager::WalkRules(nsIStyleSet* aStyleSet,
GetOutermostStyleScope(aContent, getter_AddRefs(parent));
WalkRules(aFunc, aData, parent, aContent);
if (parent) {
// We cut ourselves off, but we still need to walk the document's attribute sheet
// so that inline style continues to work on anonymous content.
nsCOMPtr<nsIDocument> document;
aContent->GetDocument(*getter_AddRefs(document));
nsCOMPtr<nsIHTMLContentContainer> container(do_QueryInterface(document));
nsCOMPtr<nsIHTMLCSSStyleSheet> inlineSheet;
container->GetInlineStyleSheet(getter_AddRefs(inlineSheet));
nsCOMPtr<nsIStyleRuleProcessor> inlineCSS(do_QueryInterface(inlineSheet));
(*aFunc)((nsISupports*)(inlineCSS.get()), aData);
}
return NS_OK;
}

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

@ -5434,6 +5434,14 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
content->SetParent(aParent);
content->SetDocument(aDocument, PR_TRUE, PR_TRUE);
content->SetBindingParent(content);
nsCOMPtr<nsIContent> child;
PRInt32 childCount;
content->ChildCount(childCount);
for (PRInt32 j = 0; j < childCount; j++) {
content->ChildAt(j, *getter_AddRefs(child));
child->SetParent(content);
}
nsIFrame * newFrame = nsnull;
nsresult rv = creator->CreateFrameFor(aPresContext, content, &newFrame);

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

@ -5434,6 +5434,14 @@ nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresShell* aPresShell,
content->SetParent(aParent);
content->SetDocument(aDocument, PR_TRUE, PR_TRUE);
content->SetBindingParent(content);
nsCOMPtr<nsIContent> child;
PRInt32 childCount;
content->ChildCount(childCount);
for (PRInt32 j = 0; j < childCount; j++) {
content->ChildAt(j, *getter_AddRefs(child));
child->SetParent(content);
}
nsIFrame * newFrame = nsnull;
nsresult rv = creator->CreateFrameFor(aPresContext, content, &newFrame);

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

@ -629,6 +629,18 @@ nsBindingManager::WalkRules(nsIStyleSet* aStyleSet,
GetOutermostStyleScope(aContent, getter_AddRefs(parent));
WalkRules(aFunc, aData, parent, aContent);
if (parent) {
// We cut ourselves off, but we still need to walk the document's attribute sheet
// so that inline style continues to work on anonymous content.
nsCOMPtr<nsIDocument> document;
aContent->GetDocument(*getter_AddRefs(document));
nsCOMPtr<nsIHTMLContentContainer> container(do_QueryInterface(document));
nsCOMPtr<nsIHTMLCSSStyleSheet> inlineSheet;
container->GetInlineStyleSheet(getter_AddRefs(inlineSheet));
nsCOMPtr<nsIStyleRuleProcessor> inlineCSS(do_QueryInterface(inlineSheet));
(*aFunc)((nsISupports*)(inlineCSS.get()), aData);
}
return NS_OK;
}