aChild->GetTag(*getter_AddRefs(type));
aChild->GetTag(getter_AddRefs(type));
nsHTMLFrameOuterFrame::AttributeChanged(nsIPresContext* aPresContext,                                        nsIContent* aChild,                                        PRInt32 aNameSpaceID,                                        nsIAtom* aAttribute,                                        PRInt32 aModType,                                        PRInt32 aHint){  nsCOMPtr<nsIAtom> type;  aChild->GetTag(*getter_AddRefs(type));  if ((type != nsHTMLAtoms::object && aAttribute == nsHTMLAtoms::src) ||      (type == nsHTMLAtoms::object && aAttribute == nsHTMLAtoms::data)) {    nsHTMLFrameInnerFrame* firstChild =      NS_STATIC_CAST(nsHTMLFrameInnerFrame*, mFrames.FirstChild());    if (firstChild && firstChild->mOwnsFrameLoader) {      firstChild->ReloadURL();    }  }  // If the noResize attribute changes, dis/allow frame to be resized  else if (aAttribute == nsHTMLAtoms::noresize) {    nsCOMPtr<nsIContent> parentContent;    mContent->GetParent(*getter_AddRefs(parentContent));    nsCOMPtr<nsIAtom> parentTag;    parentContent->GetTag(*getter_AddRefs(parentTag));    if (parentTag == nsHTMLAtoms::frameset) {      nsIFrame* parentFrame = nsnull;      GetParent(&parentFrame);      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) {    nsHTMLFrameInnerFrame* firstChild = NS_STATIC_CAST(nsHTMLFrameInnerFrame*,                                                       mFrames.FirstChild());    if (!firstChild || !firstChild->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;    firstChild->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;    aPresContext->GetContainer(getter_AddRefs(container));    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.EqualsIgnoreCase("content-primary");        parentTreeOwner->ContentShellAdded(docShellAsItem, is_primary_content,                                           value.get());      }    }  }  return NS_OK;}