nsIStyleContext*  result = nsnull;
nsStyleContext*  result = nsnull;
nsIStyleContext* StyleSetImpl::ResolvePseudoStyleFor(nsIPresContext* aPresContext,                                                     nsIContent* aParentContent,                                                     nsIAtom* aPseudoTag,                                                     nsIStyleContext* aParentContext,                                                     nsICSSPseudoComparator* aComparator){  MOZ_TIMER_DEBUGLOG(("Start: StyleSetImpl::ResolvePseudoStyleFor(), this=%p\n", this));  STYLESET_START_TIMER(NS_TIMER_STYLE_RESOLUTION);  nsIStyleContext*  result = nsnull;  NS_ASSERTION(aPseudoTag, "must have pseudo tag");  NS_ASSERTION(aPresContext, "must have pres context");  NS_ASSERTION(!aParentContent ||               aParentContent->IsContentOfType(nsIContent::eELEMENT),               "content (if non-null) must be element");  if (aPseudoTag && aPresContext) {    GatherRuleProcessors();    if (mAgentRuleProcessors ||        mUserRuleProcessors  ||        mDocRuleProcessors   ||        mOverrideRuleProcessors) {      nsCOMPtr<nsIAtom> medium;      aPresContext->GetMedium(getter_AddRefs(medium));      EnsureRuleWalker(aPresContext);      PseudoRulesMatchingData data(aPresContext, medium, aParentContent,                                    aPseudoTag, aComparator, mRuleWalker);      FileRules(EnumPseudoRulesMatching, &data);      result = GetContext(aPresContext, aParentContext, aPseudoTag);           // Now reset the walker back to the root of the tree.      mRuleWalker->Reset();    }  }  MOZ_TIMER_DEBUGLOG(("Stop: StyleSetImpl::ResolvePseudoStyleFor(), this=%p\n", this));  STYLESET_STOP_TIMER(NS_TIMER_STYLE_RESOLUTION);  return result;}