mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge m-c to fx-team
This commit is contained in:
commit
645d86cc99
@ -9,10 +9,8 @@
|
||||
<![CDATA[
|
||||
function doTest()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
|
||||
var accRetrieval = Components.classes["@mozilla.org/accessibleRetrieval;1"].
|
||||
getService(Components.interfaces.nsIAccessibleRetrieval);
|
||||
var accRetrieval = SpecialPowers.Cc["@mozilla.org/accessibleRetrieval;1"].
|
||||
getService(SpecialPowers.Ci.nsIAccessibleRetrieval);
|
||||
|
||||
var treecol = document.getElementById("col");
|
||||
var x = treecol.boxObject.screenX;
|
||||
|
@ -1 +1,2 @@
|
||||
load 471493.xul
|
||||
# Disabled because it causes assertions/crashes in later crashtests, see bug 918246
|
||||
skip load 471493.xul
|
||||
|
@ -8,9 +8,6 @@ const {Connection} = require("devtools/client/connection-manager");
|
||||
|
||||
const {Cu} = require("chrome");
|
||||
const dbgClient = Cu.import("resource://gre/modules/devtools/dbg-client.jsm");
|
||||
dbgClient.UnsolicitedNotifications.appOpen = "appOpen";
|
||||
dbgClient.UnsolicitedNotifications.appClose = "appClose"
|
||||
|
||||
const _knownWebappsStores = new WeakMap();
|
||||
|
||||
let WebappsStore;
|
||||
@ -103,6 +100,14 @@ WebappsStore.prototype = {
|
||||
this._onAppClose(manifestURL);
|
||||
});
|
||||
|
||||
client.addListener("appInstall", (type, { manifestURL }) => {
|
||||
this._onAppInstall(manifestURL);
|
||||
});
|
||||
|
||||
client.addListener("appUninstall", (type, { manifestURL }) => {
|
||||
this._onAppUninstall(manifestURL);
|
||||
});
|
||||
|
||||
return deferred.resolve();
|
||||
})
|
||||
return deferred.promise;
|
||||
@ -177,6 +182,10 @@ WebappsStore.prototype = {
|
||||
let a = allApps[idx++];
|
||||
request.manifestURL = a.manifestURL;
|
||||
return client.request(request, (res) => {
|
||||
if (res.error) {
|
||||
Cu.reportError(res.message || res.error);
|
||||
}
|
||||
|
||||
if (res.url) {
|
||||
a.iconURL = res.url;
|
||||
}
|
||||
@ -204,4 +213,57 @@ WebappsStore.prototype = {
|
||||
return m != manifest;
|
||||
});
|
||||
},
|
||||
|
||||
_onAppInstall: function(manifest) {
|
||||
let client = this._connection.client;
|
||||
let request = {
|
||||
to: this._webAppsActor,
|
||||
type: "getApp",
|
||||
manifestURL: manifest
|
||||
};
|
||||
|
||||
client.request(request, (res) => {
|
||||
if (res.error) {
|
||||
if (res.error == "forbidden") {
|
||||
// We got a notification for an app we don't have access to.
|
||||
// Ignore.
|
||||
return;
|
||||
}
|
||||
Cu.reportError(res.message || res.error);
|
||||
return;
|
||||
}
|
||||
|
||||
let app = res.app;
|
||||
app.running = false;
|
||||
|
||||
let notFound = true;
|
||||
let proxifiedApp;
|
||||
for (let i = 0; i < this.object.all.length; i++) {
|
||||
let storedApp = this.object.all[i];
|
||||
if (storedApp.manifestURL == app.manifestURL) {
|
||||
this.object.all[i] = app;
|
||||
proxifiedApp = this.object.all[i];
|
||||
notFound = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (notFound) {
|
||||
this.object.all.push(app);
|
||||
proxifiedApp = this.object.all[this.object.all.length - 1];
|
||||
}
|
||||
|
||||
request.type = "getIconAsDataURL";
|
||||
client.request(request, (res) => {
|
||||
if (res.url) {
|
||||
proxifiedApp.iconURL = res.url;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
_onAppUninstall: function(manifest) {
|
||||
this.object.all = this.object.all.filter((app) => {
|
||||
return (app.manifestURL != manifest);
|
||||
});
|
||||
},
|
||||
}
|
||||
|
@ -1,31 +1,34 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mathml="http://www.w3.org/1998/Math/MathML" class="reftest-wait">
|
||||
<mathml:mfenced/>
|
||||
|
||||
|
||||
<script><![CDATA[
|
||||
var docviewer;
|
||||
function do_onload() {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var navigator1 = parent.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIWebNavigation);
|
||||
var docShell = navigator1.QueryInterface(Components.interfaces.nsIDocShell);
|
||||
docviewer = docShell.contentViewer.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
|
||||
var navigator1 = SpecialPowers.wrap(parent).QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor).getInterface(SpecialPowers.Ci.nsIWebNavigation);
|
||||
var docShell = navigator1.QueryInterface(SpecialPowers.Ci.nsIDocShell);
|
||||
docviewer = docShell.contentViewer.QueryInterface(SpecialPowers.Ci.nsIMarkupDocumentViewer);
|
||||
|
||||
setTimeout(function() {window.location.reload()}, 500);
|
||||
setTimeout(doe,50, 0.2);
|
||||
setTimeout(function() {
|
||||
clearTimeout(timer);
|
||||
docviewer.textZoom = 1;
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, 500);
|
||||
setTimeout(doe,50, 0.2);
|
||||
}
|
||||
do_onload();
|
||||
|
||||
var timer;
|
||||
function doe(i) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
docviewer.textZoom += i;
|
||||
docviewer.textZoom += i;
|
||||
|
||||
if (docviewer.textZoom >=4)
|
||||
i = -0.2;
|
||||
if (docviewer.textZoom >=4)
|
||||
i = -0.2;
|
||||
|
||||
if (docviewer.textZoom <=0)
|
||||
i = 0.2;
|
||||
window.status = docviewer.textZoom;
|
||||
setTimeout(doe, 50, i);
|
||||
if (docviewer.textZoom <=0)
|
||||
i = 0.2;
|
||||
window.status = docviewer.textZoom;
|
||||
timer = setTimeout(doe, 50, i);
|
||||
}
|
||||
]]></script>
|
||||
</html>
|
@ -1,7 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
|
||||
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
<!DOCTYPE html [
|
||||
<!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
|
||||
%htmlDTD;
|
||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
|
||||
%brandDTD;
|
||||
<!ENTITY % abouthomeDTD SYSTEM "chrome://browser/locale/aboutHome.dtd">
|
||||
%abouthomeDTD;
|
||||
]>
|
||||
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@ -9,6 +15,7 @@
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>&abouthome.title;</title>
|
||||
<link rel="icon" type="image/png" sizes="64x64" href="chrome://branding/content/favicon64.png" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>&privatebrowsingpage.title;</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1; user-scalable=no"/>
|
||||
<link rel="stylesheet" href="chrome://browser/skin/aboutPrivateBrowsing.css" type="text/css" media="all"/>
|
||||
<link rel="icon" type="image/png" href="chrome://branding/content/favicon32.png" />
|
||||
|
5
mobile/android/locales/en-US/chrome/aboutHome.dtd
Normal file
5
mobile/android/locales/en-US/chrome/aboutHome.dtd
Normal file
@ -0,0 +1,5 @@
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!ENTITY abouthome.title "&brandShortName; Home">
|
@ -14,6 +14,7 @@
|
||||
locale/@AB_CD@/browser/aboutDownloads.dtd (%chrome/aboutDownloads.dtd)
|
||||
locale/@AB_CD@/browser/aboutDownloads.properties (%chrome/aboutDownloads.properties)
|
||||
locale/@AB_CD@/browser/aboutFeedback.dtd (%chrome/aboutFeedback.dtd)
|
||||
locale/@AB_CD@/browser/aboutHome.dtd (%chrome/aboutHome.dtd)
|
||||
locale/@AB_CD@/browser/aboutPrivateBrowsing.dtd (%chrome/aboutPrivateBrowsing.dtd)
|
||||
locale/@AB_CD@/browser/aboutReader.properties (%chrome/aboutReader.properties)
|
||||
#ifdef MOZ_SERVICES_HEALTHREPORT
|
||||
|
@ -3,6 +3,8 @@
|
||||
|
||||
include ../../testing/crashtest/sanity/crashtests.list
|
||||
|
||||
include ../../accessible/tests/crashtests/crashtests.list
|
||||
|
||||
include ../../content/base/crashtests/crashtests.list
|
||||
include ../../content/canvas/crashtests/crashtests.list
|
||||
include ../../content/events/crashtests/crashtests.list
|
||||
|
@ -57,6 +57,23 @@ add_test(function testGetAll() {
|
||||
});
|
||||
});
|
||||
|
||||
add_test(function testGetApp() {
|
||||
let manifestURL = APP_ORIGIN + "/manifest.webapp";
|
||||
let request = {type: "getApp", manifestURL: manifestURL};
|
||||
webappActorRequest(request, function (aResponse) {
|
||||
do_check_true("app" in aResponse);
|
||||
let app = aResponse.app;
|
||||
do_check_eq(app.id, gAppId);
|
||||
do_check_eq(app.name, "Test app");
|
||||
do_check_eq(app.manifest.description, "Testing webapps actor");
|
||||
do_check_eq(app.manifest.launch_path, "/index.html");
|
||||
do_check_eq(app.origin, APP_ORIGIN);
|
||||
do_check_eq(app.installOrigin, app.origin);
|
||||
do_check_eq(app.manifestURL, app.origin + "/manifest.webapp");
|
||||
run_next_test();
|
||||
});
|
||||
});
|
||||
|
||||
add_test(function testLaunchApp() {
|
||||
let manifestURL = APP_ORIGIN + "/manifest.webapp";
|
||||
let startPoint = "/index.html";
|
||||
@ -103,6 +120,7 @@ add_test(function testCloseApp() {
|
||||
let red1px = "data:application/xml;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12P4z8AAAAMBAQAY3Y2wAAAAAElFTkSuQmCC";
|
||||
let blue1px = "data:application/xml;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12MwZDgHAAFlAQBDpjhLAAAAAElFTkSuQmCC";
|
||||
|
||||
/* testGetIcon and testGetIconWithCustomSize disabled: bug 920981
|
||||
add_test(function testGetIcon() {
|
||||
let manifestURL = APP_ORIGIN + "/manifest.webapp";
|
||||
let request = {
|
||||
@ -134,6 +152,7 @@ add_test(function testGetIconWithCustomSize() {
|
||||
run_next_test();
|
||||
});
|
||||
});
|
||||
*/
|
||||
|
||||
add_test(function testUninstall() {
|
||||
let manifestURL = APP_ORIGIN + "/manifest.webapp";
|
||||
|
@ -4,4 +4,3 @@ tail = tail_apps.js
|
||||
support-files = data/app.zip
|
||||
|
||||
[test_webappsActor.js]
|
||||
skip-if = (os == "win" || "linux" || "mac")
|
||||
|
@ -934,7 +934,6 @@ var WalkerActor = protocol.ActorClass({
|
||||
}
|
||||
|
||||
this._installHelperSheet(node);
|
||||
this.layoutHelpers.scrollIntoViewIfNeeded(node.rawNode);
|
||||
DOMUtils.addPseudoClassLock(node.rawNode, HIGHLIGHTED_PSEUDO_CLASS);
|
||||
this._highlightTimeout = setTimeout(this._unhighlight.bind(this), HIGHLIGHTED_TIMEOUT);
|
||||
|
||||
|
@ -541,6 +541,32 @@ WebappsActor.prototype = {
|
||||
return deferred.promise;
|
||||
},
|
||||
|
||||
getApp: function wa_actorGetApp(aRequest) {
|
||||
debug("getAll");
|
||||
|
||||
let manifestURL = aRequest.manifestURL;
|
||||
if (!manifestURL) {
|
||||
return { error: "missingParameter",
|
||||
message: "missing parameter manifestURL" };
|
||||
}
|
||||
|
||||
let reg = DOMApplicationRegistry;
|
||||
let app = reg.getAppByManifestURL(manifestURL);
|
||||
if (!app) {
|
||||
return { error: "appNotFound" };
|
||||
}
|
||||
|
||||
if (this._isAppAllowedForManifest(app.manifestURL)) {
|
||||
let deferred = promise.defer();
|
||||
reg.getManifestFor(manifestURL, function (manifest) {
|
||||
app.manifest = manifest;
|
||||
deferred.resolve({app: app});
|
||||
});
|
||||
return deferred.promise;
|
||||
}
|
||||
return { error: "forbidden" };
|
||||
},
|
||||
|
||||
_areCertifiedAppsAllowed: function wa__areCertifiedAppsAllowed() {
|
||||
let pref = "devtools.debugger.forbid-certified-apps";
|
||||
return !Services.prefs.getBoolPref(pref);
|
||||
@ -928,6 +954,7 @@ if (Services.prefs.getBoolPref("devtools.debugger.enable-content-actors")) {
|
||||
let requestTypes = WebappsActor.prototype.requestTypes;
|
||||
requestTypes.uploadPackage = WebappsActor.prototype.uploadPackage;
|
||||
requestTypes.getAll = WebappsActor.prototype.getAll;
|
||||
requestTypes.getApp = WebappsActor.prototype.getApp;
|
||||
requestTypes.launch = WebappsActor.prototype.launch;
|
||||
requestTypes.close = WebappsActor.prototype.close;
|
||||
requestTypes.uninstall = WebappsActor.prototype.uninstall;
|
||||
|
Loading…
Reference in New Issue
Block a user