nsIAtom *type = aChild->Tag();
nsIAtom *type = mContent->Tag();
nsSubDocumentFrame::AttributeChanged(nsIContent* aChild,                                     PRInt32 aNameSpaceID,                                     nsIAtom* aAttribute,                                     PRInt32 aModType){  nsIAtom *type = aChild->Tag();  if ((type != nsHTMLAtoms::object && aAttribute == nsHTMLAtoms::src) ||      (type == nsHTMLAtoms::object && aAttribute == nsHTMLAtoms::data)) {    ReloadURL();  }  // If the noResize attribute changes, dis/allow frame to be resized  else if (aAttribute == nsHTMLAtoms::noresize) {    if (mContent->GetParent()->Tag() == nsHTMLAtoms::frameset) {      nsIFrame* parentFrame = GetParent();      if (parentFrame) {        // There is no interface for nsHTMLFramesetFrame so QI'ing to        // concrete class, yay!        nsHTMLFramesetFrame* framesetFrame = nsnull;        parentFrame->QueryInterface(NS_GET_IID(nsHTMLFramesetFrame),                                    (void **)&framesetFrame);        if (framesetFrame) {          framesetFrame->RecalculateBorderResize();        }      }    }  }  else if (aAttribute == nsHTMLAtoms::type) {    if (!mFrameLoader)       return NS_OK;    nsAutoString value;    aChild->GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, value);    // Notify our enclosing chrome that the primary content shell    // has changed.    nsCOMPtr<nsIDocShell> docShell;    mFrameLoader->GetDocShell(getter_AddRefs(docShell));    nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(docShell));    // If our container is a web-shell, inform it that it has a new    // child. If it's not a web-shell then some things will not operate    // properly.    nsCOMPtr<nsISupports> container = GetPresContext()->GetContainer();    nsCOMPtr<nsIDocShellTreeNode> parentAsNode(do_QueryInterface(container));    if (parentAsNode) {      nsCOMPtr<nsIDocShellTreeItem> parentAsItem =        do_QueryInterface(parentAsNode);      nsCOMPtr<nsIDocShellTreeOwner> parentTreeOwner;      parentAsItem->GetTreeOwner(getter_AddRefs(parentTreeOwner));      if (parentTreeOwner) {        PRInt32 parentType;        parentAsItem->GetItemType(&parentType);        PRBool is_primary_content =          parentType == nsIDocShellTreeItem::typeChrome &&          value.LowerCaseEqualsLiteral("content-primary");        parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary_content,                                           value.get());      }    }  }  return NS_OK;}