mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1084543 - Make shift-reload bypass the image cache for data URIs. r=seth
This commit is contained in:
parent
ace1b2a926
commit
1ed79a30a8
@ -1611,11 +1611,16 @@ bool imgLoader::ValidateEntry(imgCacheEntry *aEntry,
|
||||
aCORSMode, aLoadingPrincipal))
|
||||
return false;
|
||||
|
||||
// Never validate data URIs.
|
||||
// data URIs are immutable and by their nature can't leak data, so we can
|
||||
// just return true in that case. Doing so would mean that shift-reload
|
||||
// doesn't reload data URI documents/images though (which is handy for
|
||||
// debugging during gecko development) so we make an exception in that case.
|
||||
nsAutoCString scheme;
|
||||
aURI->GetScheme(scheme);
|
||||
if (scheme.EqualsLiteral("data"))
|
||||
if (scheme.EqualsLiteral("data") &&
|
||||
!(aLoadFlags & nsIRequest::LOAD_BYPASS_CACHE)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool validateRequest = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user