fix bug 34165, Allow viewing blocked images
git-svn-id: svn://10.0.0.236/trunk@65237 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
32a96f6bd1
commit
27414f118e
@ -1919,6 +1919,20 @@ PRBool il_PermitLoad(const char * image_url, nsIImageRequestObserver * aObserver
|
||||
if (presContext) {
|
||||
nsCOMPtr<nsIURI> firstURI;
|
||||
presContext->GetBaseURL(getter_AddRefs(firstURI));
|
||||
|
||||
/* Check to see if the image is the whole page, in which case accept it */
|
||||
char* firstSpec = 0;
|
||||
char* thisSpec = 0;
|
||||
firstURI->GetSpec(&firstSpec);
|
||||
uri->GetSpec(&thisSpec);
|
||||
PRBool onlyImageOnPage = !PL_strcmp(firstSpec, thisSpec);
|
||||
Recycle(firstSpec);
|
||||
Recycle(thisSpec);
|
||||
if (onlyImageOnPage) {
|
||||
Recycle(host);
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
rv = firstURI->GetHost(&firstHost);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user