NS_ASSERTION(aStyleStruct, "Failed to get a style struct");
nsComputedDOMStyle::GetStyleData(nsStyleStructID aID,                                 const nsStyleStruct*& aStyleStruct,                                 nsIFrame* aFrame){  if(aFrame && !mPseudo) {    aFrame->GetStyleData(aID, aStyleStruct);  }  else {    nsCOMPtr<nsIPresShell> presShell=do_QueryReferent(mPresShellWeak);    NS_ENSURE_TRUE(presShell, NS_ERROR_FAILURE);    nsCOMPtr<nsIPresContext> pctx;    presShell->GetPresContext(getter_AddRefs(pctx));    if(pctx) {      nsCOMPtr<nsIStyleContext> sctx;      if(!mPseudo) {        pctx->ResolveStyleContextFor(mContent, nsnull, PR_FALSE,                                     getter_AddRefs(sctx));      }      else {        pctx->ResolvePseudoStyleContextFor(mContent, mPseudo, nsnull, PR_FALSE,                                           getter_AddRefs(sctx));      }      if(sctx) {        aStyleStruct=sctx->GetStyleData(aID);      }      mStyleContextHolder=sctx;    }  }  return NS_OK;}