mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge b-i to m-c, a=merge
This commit is contained in:
commit
6abd84d43f
@ -861,6 +861,9 @@ pref("dom.identity.enabled", true);
|
||||
// Wait up to this much milliseconds when orientation changed
|
||||
pref("layers.orientation.sync.timeout", 1000);
|
||||
|
||||
// Animate the orientation change
|
||||
pref("b2g.orientation.animate", true);
|
||||
|
||||
// Don't discard WebGL contexts for foreground apps on memory
|
||||
// pressure.
|
||||
pref("webgl.can-lose-context-in-foreground", false);
|
||||
|
@ -628,6 +628,10 @@ var shell = {
|
||||
content.removeEventListener('load', shell_homeLoaded);
|
||||
shell.isHomeLoaded = true;
|
||||
|
||||
if (Services.prefs.getBoolPref('b2g.orientation.animate')) {
|
||||
Cu.import('resource://gre/modules/OrientationChangeHandler.jsm');
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
libcutils.property_set('sys.boot_completed', '1');
|
||||
#endif
|
||||
|
70
b2g/components/OrientationChangeHandler.jsm
Normal file
70
b2g/components/OrientationChangeHandler.jsm
Normal file
@ -0,0 +1,70 @@
|
||||
/* 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/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
this.EXPORTED_SYMBOLS = [];
|
||||
|
||||
const Cu = Components.utils;
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
let window = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
let system = window.document.getElementById("systemapp");
|
||||
|
||||
let OrientationChangeHandler = {
|
||||
// Clockwise orientations, looping
|
||||
orientations: ["portrait-primary", "landscape-secondary",
|
||||
"portrait-secondary", "landscape-primary",
|
||||
"portrait-primary"],
|
||||
|
||||
lastOrientation: "portrait-primary",
|
||||
|
||||
init: function() {
|
||||
window.screen.addEventListener("mozorientationchange", this, true);
|
||||
},
|
||||
|
||||
handleEvent: function(evt) {
|
||||
let newOrientation = window.screen.mozOrientation;
|
||||
let orientationIndex = this.orientations.indexOf(this.lastOrientation);
|
||||
let nextClockwiseOrientation = this.orientations[orientationIndex + 1];
|
||||
let fullSwitch = (newOrientation.split("-")[0] ==
|
||||
this.lastOrientation.split("-")[0]);
|
||||
|
||||
this.lastOrientation = newOrientation;
|
||||
|
||||
let angle, xFactor, yFactor;
|
||||
if (fullSwitch) {
|
||||
angle = 180;
|
||||
xFactor = 1;
|
||||
} else {
|
||||
angle = (nextClockwiseOrientation == newOrientation) ? 90 : -90;
|
||||
xFactor = window.innerWidth / window.innerHeight;
|
||||
}
|
||||
yFactor = 1 / xFactor;
|
||||
|
||||
system.style.transition = "";
|
||||
system.style.transform = "rotate(" + angle + "deg)" +
|
||||
"scale(" + xFactor + ", " + yFactor + ")";
|
||||
|
||||
function trigger() {
|
||||
system.style.transition = "transform .25s cubic-bezier(.15, .7, .6, .9)";
|
||||
|
||||
system.style.opacity = "";
|
||||
system.style.transform = "";
|
||||
}
|
||||
|
||||
// 180deg rotation, no resize
|
||||
if (fullSwitch) {
|
||||
window.setTimeout(trigger);
|
||||
return;
|
||||
}
|
||||
|
||||
window.addEventListener("resize", function waitForResize(e) {
|
||||
window.removeEventListener("resize", waitForResize);
|
||||
trigger();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
OrientationChangeHandler.init();
|
@ -59,6 +59,7 @@ EXTRA_JS_MODULES += [
|
||||
'LogCapture.jsm',
|
||||
'LogParser.jsm',
|
||||
'LogShake.jsm',
|
||||
'OrientationChangeHandler.jsm',
|
||||
'SignInToWebsite.jsm',
|
||||
'SystemAppProxy.jsm',
|
||||
'TelURIParser.jsm',
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e06971db7acf7a35c32eb74d675a4e12e288e6be">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="740c7c2330d08eb9298597e0455f53d4619bbc1a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="740c7c2330d08eb9298597e0455f53d4619bbc1a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eb1795a9002eb142ac58c8d68f8f4ba094af07ca"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="740c7c2330d08eb9298597e0455f53d4619bbc1a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="5d482e320548e7ef0a44f62fd7ad51778cca4b3a"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e06971db7acf7a35c32eb74d675a4e12e288e6be">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="740c7c2330d08eb9298597e0455f53d4619bbc1a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -19,7 +19,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="740c7c2330d08eb9298597e0455f53d4619bbc1a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eb1795a9002eb142ac58c8d68f8f4ba094af07ca"/>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<project name="platform_build" path="build" remote="b2g" revision="e06971db7acf7a35c32eb74d675a4e12e288e6be">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="740c7c2330d08eb9298597e0455f53d4619bbc1a"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="740c7c2330d08eb9298597e0455f53d4619bbc1a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="5d482e320548e7ef0a44f62fd7ad51778cca4b3a"/>
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"git": {
|
||||
"git_revision": "ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94",
|
||||
"git_revision": "740c7c2330d08eb9298597e0455f53d4619bbc1a",
|
||||
"remote": "https://git.mozilla.org/releases/gaia.git",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "3dc35073ce80056af02c7869ad97079e6f612714",
|
||||
"revision": "818207e60d5ab4b742fd7a72f045e7cbb059dede",
|
||||
"repo_path": "integration/gaia-central"
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="740c7c2330d08eb9298597e0455f53d4619bbc1a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
|
@ -17,7 +17,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="ab69ae06a7f2b54e60ab63b1b44c8d19d5d20d94"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="740c7c2330d08eb9298597e0455f53d4619bbc1a"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="5d482e320548e7ef0a44f62fd7ad51778cca4b3a"/>
|
||||
|
@ -668,7 +668,7 @@ this.AllPossiblePermissions = [];
|
||||
AllPossiblePermissions.concat(["indexedDB", "offline-app", "pin-app"]);
|
||||
})();
|
||||
|
||||
this.isExplicitInPermissionsTable = function(aPermName, aIntStatus) {
|
||||
this.isExplicitInPermissionsTable = function(aPermName, aIntStatus, aAppKind) {
|
||||
|
||||
// Check to see if the 'webapp' is app/privileged/certified.
|
||||
let appStatus;
|
||||
@ -680,7 +680,7 @@ this.isExplicitInPermissionsTable = function(aPermName, aIntStatus) {
|
||||
appStatus = "privileged";
|
||||
break;
|
||||
default: // If it isn't certified or privileged, it's app
|
||||
appStatus = "app";
|
||||
appStatus = aAppKind == "hosted-trusted" ? "trusted" : "app";
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
* We expose Gecko-internal helpers related to "web apps" through this
|
||||
* sub-interface.
|
||||
*/
|
||||
[scriptable, uuid(1d856b11-ac29-47d3-bd52-a86e3d45fcf4)]
|
||||
[scriptable, uuid(1d856b11-ac29-47d3-bd52-a86e3d45fcf5)]
|
||||
interface mozIApplication: nsISupports
|
||||
{
|
||||
/* Return true if this app has |permission|. */
|
||||
@ -55,4 +55,7 @@ interface mozIApplication: nsISupports
|
||||
|
||||
/* role copied from the manifest */
|
||||
readonly attribute DOMString role;
|
||||
|
||||
/* Returns the kind of the app. */
|
||||
readonly attribute DOMString kind;
|
||||
};
|
||||
|
@ -399,10 +399,12 @@ MediaSourceReader::ContinueShutdown()
|
||||
mVideoTrack = nullptr;
|
||||
mVideoReader = nullptr;
|
||||
|
||||
#ifdef MOZ_FMP4
|
||||
if (mSharedDecoderManager) {
|
||||
mSharedDecoderManager->Shutdown();
|
||||
mSharedDecoderManager = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
MOZ_ASSERT(mAudioPromise.IsEmpty());
|
||||
MOZ_ASSERT(mVideoPromise.IsEmpty());
|
||||
|
@ -61,10 +61,13 @@ PermissionSettings.prototype = {
|
||||
aBrowserFlag) {
|
||||
debug("isExplicit: " + aPermName + ", " + aManifestURL + ", " + aOrigin);
|
||||
let uri = Services.io.newURI(aOrigin, null, null);
|
||||
let appID = appsService.getAppLocalIdByManifestURL(aManifestURL);
|
||||
let principal = Services.scriptSecurityManager.getAppCodebasePrincipal(uri, appID, aBrowserFlag);
|
||||
let app = appsService.getAppByManifestURL(aManifestURL);
|
||||
let principal = Services.scriptSecurityManager
|
||||
.getAppCodebasePrincipal(uri, app.localId, aBrowserFlag);
|
||||
|
||||
return isExplicitInPermissionsTable(aPermName, principal.appStatus);
|
||||
return isExplicitInPermissionsTable(aPermName,
|
||||
principal.appStatus,
|
||||
app.kind);
|
||||
},
|
||||
|
||||
set: function set(aPermName, aPermValue, aManifestURL, aOrigin,
|
||||
|
Loading…
Reference in New Issue
Block a user