mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-21 14:47:31 +09:00
Bug 1173523 - Part 9: Update pageinfo to use the new API for nsIPermission
This commit is contained in:
parent
6ed79ae702
commit
d03744a3a1
2 changed files with 4 additions and 3 deletions
|
|
@ -1112,11 +1112,12 @@ var imagePermissionObserver = {
|
||||||
var row = getSelectedRow(imageTree);
|
var row = getSelectedRow(imageTree);
|
||||||
var item = gImageView.data[row][COL_IMAGE_NODE];
|
var item = gImageView.data[row][COL_IMAGE_NODE];
|
||||||
var url = gImageView.data[row][COL_IMAGE_ADDRESS];
|
var url = gImageView.data[row][COL_IMAGE_ADDRESS];
|
||||||
if (makeURI(url).host == permission.host)
|
if (permission.matchesURI(makeURI(url), true)) {
|
||||||
makeBlockImage(url);
|
makeBlockImage(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getContentTypeFromHeaders(cacheEntryDescriptor)
|
function getContentTypeFromHeaders(cacheEntryDescriptor)
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ var permissionObserver = {
|
||||||
if (aTopic == "perm-changed") {
|
if (aTopic == "perm-changed") {
|
||||||
var permission = aSubject.QueryInterface(
|
var permission = aSubject.QueryInterface(
|
||||||
Components.interfaces.nsIPermission);
|
Components.interfaces.nsIPermission);
|
||||||
if (permission.host == gPermURI.host) {
|
if (permission.matchesURI(gPermURI, true)) {
|
||||||
if (permission.type in gPermObj)
|
if (permission.type in gPermObj)
|
||||||
initRow(permission.type);
|
initRow(permission.type);
|
||||||
else if (permission.type.startsWith("plugin"))
|
else if (permission.type.startsWith("plugin"))
|
||||||
|
|
@ -119,7 +119,7 @@ function onLoadPermission(principal)
|
||||||
gPermURI = uri;
|
gPermURI = uri;
|
||||||
gPermPrincipal = principal;
|
gPermPrincipal = principal;
|
||||||
var hostText = document.getElementById("hostText");
|
var hostText = document.getElementById("hostText");
|
||||||
hostText.value = gPermURI.host;
|
hostText.value = gPermURI.prePath;
|
||||||
|
|
||||||
for (var i in gPermObj)
|
for (var i in gPermObj)
|
||||||
initRow(i);
|
initRow(i);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue