nsCOMPtr<nsIPref> prefs = do_GetService(NS_PREF_CONTRACTID);
nsCOMPtr<nsIPrefBranch> prefBranch = do_GetService(NS_PREFSERVICE_CONTRACTID);
static eNormalLineHeightControl GetNormalLineHeightCalcControl(void){  if (sNormalLineHeightControl == eUninitialized) {    nsCOMPtr<nsIPref> prefs = do_GetService(NS_PREF_CONTRACTID);    PRInt32 intPref;    // browser.display.normal_lineheight_calc_control is not user changable, so     // no need to register callback for it.    if (prefs && NS_SUCCEEDED(prefs->GetIntPref(                 "browser.display.normal_lineheight_calc_control", &intPref)))      sNormalLineHeightControl = NS_STATIC_CAST(eNormalLineHeightControl, intPref);    else      sNormalLineHeightControl = eNoExternalLeading;  }  return sNormalLineHeightControl;}