if (parent) {   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); }
content = parent; } while (content);    *aCutOffInheritance = (content != nsnull);   aData->mScopedRoot = nsnull;
nsBindingManager::WalkRules(nsIStyleSet* aStyleSet,                            nsISupportsArrayEnumFunc aFunc, void* aData,                            nsIContent* aContent){  if (!aContent)    return NS_OK;  nsCOMPtr<nsIContent> parent;  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;}