if( aSource > mHintCharsetSource ) { mHintCharset = aCharset; mHintCharsetSource = aSource; mViewSource = (0==PL_strcmp("view-source", aCmd)); if(eCharsetReloadRequested != mCharsetReloadState) { mCharsetReloadState = eCharsetReloadRequested; return Reload(nsIChannel::LOAD_NORMAL); }
nsCOMPtr<nsIContentViewer> cv; NS_ENSURE_SUCCESS(GetContentViewer(getter_AddRefs(cv)), NS_ERROR_FAILURE); if (cv) { nsCOMPtr<nsIMarkupDocumentViewer> muDV = do_QueryInterface(cv); if (muDV) { nsCharsetSource hint; muDV->GetHintCharacterSetSource((PRInt32 *)(&hint)); if( aSource > hint ) { muDV->SetHintCharacterSet(NS_ConvertASCIItoUCS2(aCharset).GetUnicode()); muDV->SetHintCharacterSetSource((PRInt32)aSource); if(eCharsetReloadRequested != mCharsetReloadState) { mCharsetReloadState = eCharsetReloadRequested; return Reload(LOAD_FLAGS_NONE); } } }
nsWebShell::ReloadDocument(const char* aCharset,                           nsCharsetSource aSource,                           const char* aCmd){  // XXX hack. kee the aCharset and aSource wait to pick it up  if( aSource > mHintCharsetSource ) {     mHintCharset = aCharset;     mHintCharsetSource = aSource;     mViewSource = (0==PL_strcmp("view-source", aCmd));     if(eCharsetReloadRequested != mCharsetReloadState)      {        mCharsetReloadState = eCharsetReloadRequested;        return Reload(nsIChannel::LOAD_NORMAL);     }  }  return NS_OK;}