if (font->mFlags & NS_STYLE_FONT_USE_FIXED) { const nsString& fontName = font->mFixedFont.name; const nsFont& defaultFont = presContext->GetDefaultFixedFontDeprecated();
const nsString& fontName = font->mFont.name; PRUint8 generic = font->mFlags & NS_STYLE_FONT_FACE_MASK; if (generic == kGenericFont_NONE) { nsFont defaultFont; presContext->GetDefaultFont(kPresContext_DefaultVariableFont_ID, defaultFont);
nsComputedDOMStyle::GetFontFamily(nsIFrame *aFrame,                             nsIDOMCSSPrimitiveValue*& aValue){  nsROCSSPrimitiveValue* val=GetROCSSPrimitiveValue();  NS_ENSURE_TRUE(val, NS_ERROR_OUT_OF_MEMORY);  const nsStyleFont* font=nsnull;  GetStyleData(eStyleStruct_Font, (const nsStyleStruct*&)font, aFrame);  if(font) {    nsCOMPtr<nsIPresShell> presShell=do_QueryReferent(mPresShellWeak);    NS_ASSERTION(presShell, "pres shell is required");    nsCOMPtr<nsIPresContext> presContext;    presShell->GetPresContext(getter_AddRefs(presContext));    NS_ASSERTION(presContext, "pres context is required");    if (font->mFlags & NS_STYLE_FONT_USE_FIXED) {      const nsString& fontName = font->mFixedFont.name;      const nsFont& defaultFont = presContext->GetDefaultFixedFontDeprecated();      PRInt32 lendiff = fontName.Length() - defaultFont.name.Length();      if (lendiff > 0) {        val->SetString(Substring(fontName, 0, lendiff-1)); // -1 removes comma      } else {        val->SetString(fontName);      }    } else {      const nsString& fontName = font->mFont.name;      const nsFont& defaultFont = presContext->GetDefaultFontDeprecated();      PRInt32 lendiff = fontName.Length() - defaultFont.name.Length();      if (lendiff > 0) {        val->SetString(Substring(fontName, 0, lendiff-1)); // -1 removes comma      } else {        val->SetString(fontName);      }    }  }  else {    val->SetString("");  }  return val->QueryInterface(NS_GET_IID(nsIDOMCSSPrimitiveValue),                             (void **)&aValue);}