Skip to content

Commit

Permalink
Backed out changeset 15f8fa34d2f4 (bug 1580567) for perma fails on br…
Browse files Browse the repository at this point in the history
…owser_temporary_permissions_expiry.js and browser_privatebrowsing_rememberprompt.js. CLOSED TREE
  • Loading branch information
Razvan Maries committed Dec 4, 2019
1 parent faeb577 commit 4d7fece
Show file tree
Hide file tree
Showing 42 changed files with 81 additions and 603 deletions.
2 changes: 0 additions & 2 deletions browser/app/profile/firefox.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,6 @@ pref("permissions.manager.defaultsUrl", "resource://app/defaults/permissions");
pref("permissions.default.camera", 0);
pref("permissions.default.microphone", 0);
pref("permissions.default.geo", 0);
pref("permissions.default.xr", 0);
pref("permissions.default.desktop-notification", 0);
pref("permissions.default.shortcuts", 0);

Expand Down Expand Up @@ -838,7 +837,6 @@ pref("gecko.handlerService.schemes.ircs.3.name", "chrome://browser-region/locale
pref("gecko.handlerService.schemes.ircs.3.uriTemplate", "chrome://browser-region/locale/region.properties");

pref("browser.geolocation.warning.infoURL", "https://www.mozilla.org/%LOCALE%/firefox/geolocation/");
pref("browser.xr.warning.infoURL", "https://www.mozilla.org/%LOCALE%/firefox/xr/");

pref("browser.sessionstore.resume_from_crash", true);
pref("browser.sessionstore.resume_session_once", false);
Expand Down
36 changes: 4 additions & 32 deletions browser/base/content/browser-siteIdentity.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,6 @@ var gIdentityHandler = {
return (this._geoSharingIcon = document.getElementById("geo-sharing-icon"));
},

get _xrSharingIcon() {
delete this._xrSharingIcon;
return (this._xrSharingIcon = document.getElementById("xr-sharing-icon"));
},

get _webRTCSharingIcon() {
delete this._webRTCSharingIcon;
return (this._webRTCSharingIcon = document.getElementById(
Expand Down Expand Up @@ -577,7 +572,6 @@ var gIdentityHandler = {
this._webRTCSharingIcon.removeAttribute("paused");
this._webRTCSharingIcon.removeAttribute("sharing");
this._geoSharingIcon.removeAttribute("sharing");
this._xrSharingIcon.removeAttribute("sharing");

if (this._sharingState) {
if (
Expand All @@ -597,9 +591,6 @@ var gIdentityHandler = {
if (this._sharingState.geo) {
this._geoSharingIcon.setAttribute("sharing", this._sharingState.geo);
}
if (this._sharingState.xr) {
this._xrSharingIcon.setAttribute("sharing", this._sharingState.xr);
}
}

if (this._identityPopup.state == "open") {
Expand Down Expand Up @@ -1354,20 +1345,6 @@ var gIdentityHandler = {
}
}

if (this._sharingState && this._sharingState.xr) {
let xrPermission = permissions.find(perm => perm.id === "xr");
if (xrPermission) {
xrPermission.sharingState = true;
} else {
permissions.push({
id: "xr",
state: SitePermissions.ALLOW,
scope: SitePermissions.SCOPE_REQUEST,
sharingState: true,
});
}
}

if (this._sharingState && this._sharingState.webRTC) {
let webrtcState = this._sharingState.webRTC;
// If WebRTC device or screen permissions are in use, we need to find
Expand Down Expand Up @@ -1595,12 +1572,9 @@ var gIdentityHandler = {
return container;
}

if (aPermission.id == "geo" || aPermission.id == "xr") {
if (aPermission.id == "geo") {
let block = document.createXULElement("vbox");
block.setAttribute(
"id",
"identity-popup-" + aPermission.id + "-container"
);
block.setAttribute("id", "identity-popup-geo-container");

let button = this._createPermissionClearButton(aPermission, block);
container.appendChild(button);
Expand Down Expand Up @@ -1634,8 +1608,8 @@ var gIdentityHandler = {
let browser = gBrowser.selectedBrowser;
this._permissionList.removeChild(container);
if (aPermission.sharingState) {
if (aPermission.id === "geo" || aPermission.id === "xr") {
let origins = browser.getDevicePermissionOrigins(aPermission.id);
if (aPermission.id === "geo") {
let origins = browser.getDevicePermissionOrigins("geo");
for (let origin of origins) {
let principal = Services.scriptSecurityManager.createContentPrincipalFromOrigin(
origin
Expand Down Expand Up @@ -1690,8 +1664,6 @@ var gIdentityHandler = {

if (aPermission.id === "geo") {
gBrowser.updateBrowserSharing(browser, { geo: false });
} else if (aPermission.id === "xr") {
gBrowser.updateBrowserSharing(browser, { xr: false });
}
});

Expand Down
5 changes: 0 additions & 5 deletions browser/base/content/browser.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -890,13 +890,10 @@
<box style="pointer-events: none;">
<image class="sharing-icon" id="webrtc-sharing-icon"/>
<image class="sharing-icon geo-icon" id="geo-sharing-icon"/>
<image class="sharing-icon xr-icon" id="xr-sharing-icon"/>
</box>
<box id="blocked-permissions-container" align="center">
<image data-permission-id="geo" class="blocked-permission-icon geo-icon" role="button"
data-l10n-id="urlbar-geolocation-blocked"/>
<image data-permission-id="xr" class="blocked-permission-icon xr-icon" role="button"
data-l10n-id="urlbar-xr-blocked"/>
<image data-permission-id="desktop-notification" class="blocked-permission-icon desktop-notification-icon" role="button"
data-l10n-id="urlbar-web-notifications-blocked"/>
<image data-permission-id="camera" class="blocked-permission-icon camera-icon" role="button"
Expand Down Expand Up @@ -927,8 +924,6 @@
data-l10n-id="urlbar-default-notification-anchor"/>
<image id="geo-notification-icon" class="notification-anchor-icon geo-icon" role="button"
data-l10n-id="urlbar-geolocation-notification-anchor"/>
<image id="xr-notification-icon" class="notification-anchor-icon xr-icon" role="button"
data-l10n-id="urlbar-xr-notification-anchor"/>
<image id="autoplay-media-notification-icon" class="notification-anchor-icon autoplay-media-icon" role="button"
data-l10n-id="urlbar-autoplay-notification-anchor"/>
<image id="addons-notification-icon" class="notification-anchor-icon install-icon" role="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ add_task(async function testTempPermissionRequestAfterExpiry() {
let principal = Services.scriptSecurityManager.createContentPrincipalFromOrigin(
ORIGIN
);
let ids = ["geo", "camera", "xr"];
let ids = ["geo", "camera"];

for (let id of ids) {
await BrowserTestUtils.withNewTab(PERMISSIONS_PAGE, async function(
Expand Down
1 change: 0 additions & 1 deletion browser/base/content/test/permissions/permissions.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<!-- This page could eventually request permissions from content
and make sure that chrome responds appropriately -->
<button id="geo" onclick="requestGeo()">Geolocation</button>
<button id="xr" onclick="navigator.getVRDisplays()">XR</button>
<button id="desktop-notification" onclick="Notification.requestPermission()">Notifications</button>
<button id="push" onclick="requestPush()">Push Notifications</button>
<button id="camera" onclick="navigator.mediaDevices.getUserMedia({video: true, fake: true})">Camera</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ async function check(contentTask, options = {}) {
let panel = await popupShownPromise;
let notification = panel.children[0];
let body = notification.querySelector(".popup-notification-body");
if (
notification.id == "geolocation-notification" ||
notification.id == "xr-notification"
) {
if (notification.id == "geolocation-notification") {
ok(
body.innerHTML.includes("local file"),
`file:// URIs should be displayed as local file.`
Expand Down Expand Up @@ -99,12 +96,6 @@ add_task(async function test_displayURI_geo() {
});
});

add_task(async function test_displayURI_xr() {
await check(async function() {
content.navigator.getVRDisplays();
});
});

add_task(async function test_displayURI_camera() {
await check(async function() {
content.navigator.mediaDevices.getUserMedia({ video: true, fake: true });
Expand All @@ -124,18 +115,6 @@ add_task(async function test_displayURI_geo_blob() {
);
});

add_task(async function test_displayURI_xr_blob() {
await check(
async function() {
let text = "<script>navigator.getVRDisplays()</script>";
let blob = new Blob([text], { type: "text/html" });
let url = content.URL.createObjectURL(blob);
content.location.href = url;
},
{ skipOnExtension: true }
);
});

add_task(async function test_displayURI_camera_blob() {
await check(
async function() {
Expand Down
3 changes: 0 additions & 3 deletions browser/components/BrowserGlue.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -4031,9 +4031,6 @@ const ContentPermissionIntegration = {
case "geolocation": {
return new PermissionUI.GeolocationPermissionPrompt(request);
}
case "xr": {
return new PermissionUI.XRPermissionPrompt(request);
}
case "desktop-notification": {
return new PermissionUI.DesktopNotificationPermissionPrompt(request);
}
Expand Down
24 changes: 0 additions & 24 deletions browser/components/preferences/in-content/privacy.inc.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -776,30 +776,6 @@
" />
</hbox>
</hbox>

<hbox id="xrSettingsRow" align="center" role="group" aria-labelledby="xrPermissionsLabel">
<description flex="1">
<image class="xr-icon permission-icon" />
<separator orient="vertical" class="thin"/>
<label id="xrPermissionsLabel" data-l10n-id="permissions-xr"/>
</description>
<hbox pack="end">
<button id="xrSettingsButton"
is="highlightable-button"
class="accessory-button"
data-l10n-id="permissions-xr-settings"
search-l10n-ids="
permissions-remove.label,
permissions-remove-all.label,
permissions-button-cancel.label,
permissions-button-ok.label,
permissions-site-xr-window.title,
permissions-site-xr-desc,
permissions-site-xr-disable-label,
permissions-site-xr-disable-desc,
" />
</hbox>
</hbox>
</vbox>

<separator flex="1"/>
Expand Down
21 changes: 0 additions & 21 deletions browser/components/preferences/in-content/privacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,6 @@ var gPrivacyPane = {
"command",
gPrivacyPane.showLocationExceptions
);
setEventListener(
"xrSettingsButton",
"command",
gPrivacyPane.showXRExceptions
);
setEventListener(
"cameraSettingsButton",
"command",
Expand Down Expand Up @@ -1684,22 +1679,6 @@ var gPrivacyPane = {
);
},

// XR

/**
* Displays the XR exceptions dialog where specific site XR
* preferences can be set.
*/
showXRExceptions() {
let params = { permissionType: "xr" };

gSubDialog.open(
"chrome://browser/content/preferences/sitePermissions.xul",
"resizable=yes",
params
);
},

// CAMERA

/**
Expand Down
6 changes: 0 additions & 6 deletions browser/components/preferences/sitePermissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ const sitePermissionsL10n = {
disableLabel: "permissions-site-location-disable-label",
disableDescription: "permissions-site-location-disable-desc",
},
xr: {
window: "permissions-site-xr-window",
description: "permissions-site-xr-desc",
disableLabel: "permissions-site-xr-disable-label",
disableDescription: "permissions-site-xr-disable-desc",
},
camera: {
window: "permissions-site-camera-window",
description: "permissions-site-camera-desc",
Expand Down
5 changes: 2 additions & 3 deletions browser/components/privatebrowsing/test/browser/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ tags = openwindow
support-files =
browser_privatebrowsing_concurrent_page.html
browser_privatebrowsing_geoprompt_page.html
browser_privatebrowsing_xrprompt_page.html
browser_privatebrowsing_localStorage_before_after_page.html
browser_privatebrowsing_localStorage_before_after_page2.html
browser_privatebrowsing_localStorage_page1.html
Expand Down Expand Up @@ -36,6 +35,8 @@ skip-if = verify
[browser_privatebrowsing_downloadLastDir_c.js]
[browser_privatebrowsing_downloadLastDir_toggle.js]
[browser_privatebrowsing_favicon.js]
[browser_privatebrowsing_geoprompt.js]
tags = geolocation
[browser_privatebrowsing_lastpbcontextexited.js]
[browser_privatebrowsing_localStorage.js]
[browser_privatebrowsing_localStorage_before_after.js]
Expand All @@ -46,8 +47,6 @@ skip-if = verify
[browser_privatebrowsing_placestitle.js]
[browser_privatebrowsing_popupblocker.js]
[browser_privatebrowsing_protocolhandler.js]
[browser_privatebrowsing_rememberprompt.js]
tags = geolocation xr
[browser_privatebrowsing_sidebar.js]
[browser_privatebrowsing_theming.js]
[browser_privatebrowsing_ui.js]
Expand Down
Loading

0 comments on commit 4d7fece

Please sign in to comment.