Bug 696301 part 2. Communicate the crossorigin preload state from the parser to the scriptloader. r=sicking,hsivonen

This commit is contained in:
Boris Zbarsky
2012-03-10 10:13:52 -06:00
parent 2c7f4c6d03
commit 30d7cb00f8
11 changed files with 85 additions and 41 deletions

View File

@@ -61,20 +61,21 @@ nsHtml5SpeculativeLoad::Perform(nsHtml5TreeOpExecutor* aExecutor)
aExecutor->SetSpeculationBase(mUrl);
break;
case eSpeculativeLoadImage:
aExecutor->PreloadImage(mUrl, mCharsetOrCrossOrigin);
aExecutor->PreloadImage(mUrl, mCrossOrigin);
break;
case eSpeculativeLoadScript:
aExecutor->PreloadScript(mUrl, mCharsetOrCrossOrigin, mTypeOrCharsetSource);
aExecutor->PreloadScript(mUrl, mCharset, mTypeOrCharsetSource,
mCrossOrigin);
break;
case eSpeculativeLoadStyle:
aExecutor->PreloadStyle(mUrl, mCharsetOrCrossOrigin);
aExecutor->PreloadStyle(mUrl, mCharset);
break;
case eSpeculativeLoadManifest:
aExecutor->ProcessOfflineManifest(mUrl);
break;
case eSpeculativeLoadSetDocumentCharset: {
nsCAutoString narrowName;
CopyUTF16toUTF8(mCharsetOrCrossOrigin, narrowName);
CopyUTF16toUTF8(mCharset, narrowName);
NS_ASSERTION(mTypeOrCharsetSource.Length() == 1,
"Unexpected charset source string");
PRInt32 intSource = (PRInt32)mTypeOrCharsetSource.First();