зеркало из https://github.com/mozilla/gecko-dev.git
Merge mozilla-central to mozilla-inbound
This commit is contained in:
Коммит
24578956df
|
@ -1,3 +1,6 @@
|
||||||
|
/* 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/. */
|
||||||
|
|
||||||
window.addEventListener("ContentStart", function(evt) {
|
window.addEventListener("ContentStart", function(evt) {
|
||||||
// Enable touch event shim on desktop that translates mouse events
|
// Enable touch event shim on desktop that translates mouse events
|
||||||
|
@ -5,6 +8,10 @@ window.addEventListener("ContentStart", function(evt) {
|
||||||
let require = Cu.import("resource://gre/modules/devtools/Loader.jsm", {})
|
let require = Cu.import("resource://gre/modules/devtools/Loader.jsm", {})
|
||||||
.devtools.require;
|
.devtools.require;
|
||||||
let { TouchEventHandler } = require("devtools/touch-events");
|
let { TouchEventHandler } = require("devtools/touch-events");
|
||||||
let touchEventHandler = new TouchEventHandler(shell.contentBrowser);
|
let chromeEventHandler = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
|
.getInterface(Ci.nsIWebNavigation)
|
||||||
|
.QueryInterface(Ci.nsIDocShell)
|
||||||
|
.chromeEventHandler || window;
|
||||||
|
let touchEventHandler = new TouchEventHandler(chromeEventHandler);
|
||||||
touchEventHandler.start();
|
touchEventHandler.start();
|
||||||
});
|
});
|
||||||
|
|
|
@ -296,14 +296,22 @@ var shell = {
|
||||||
.sessionHistory = Cc["@mozilla.org/browser/shistory;1"]
|
.sessionHistory = Cc["@mozilla.org/browser/shistory;1"]
|
||||||
.createInstance(Ci.nsISHistory);
|
.createInstance(Ci.nsISHistory);
|
||||||
|
|
||||||
|
// On firefox mulet, shell.html is loaded in a tab
|
||||||
|
// and we have to listen on the chrome event handler
|
||||||
|
// to catch key events
|
||||||
|
let chromeEventHandler = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
|
.getInterface(Ci.nsIWebNavigation)
|
||||||
|
.QueryInterface(Ci.nsIDocShell)
|
||||||
|
.chromeEventHandler || window;
|
||||||
// Capture all key events so we can filter out hardware buttons
|
// Capture all key events so we can filter out hardware buttons
|
||||||
// And send them to Gaia via mozChromeEvents.
|
// And send them to Gaia via mozChromeEvents.
|
||||||
// Ideally, hardware buttons wouldn't generate key events at all, or
|
// Ideally, hardware buttons wouldn't generate key events at all, or
|
||||||
// if they did, they would use keycodes that conform to DOM 3 Events.
|
// if they did, they would use keycodes that conform to DOM 3 Events.
|
||||||
// See discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=762362
|
// See discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=762362
|
||||||
window.addEventListener('keydown', this, true);
|
chromeEventHandler.addEventListener('keydown', this, true);
|
||||||
window.addEventListener('keypress', this, true);
|
chromeEventHandler.addEventListener('keypress', this, true);
|
||||||
window.addEventListener('keyup', this, true);
|
chromeEventHandler.addEventListener('keyup', this, true);
|
||||||
|
|
||||||
window.addEventListener('MozApplicationManifest', this);
|
window.addEventListener('MozApplicationManifest', this);
|
||||||
window.addEventListener('mozfullscreenchange', this);
|
window.addEventListener('mozfullscreenchange', this);
|
||||||
window.addEventListener('MozAfterPaint', this);
|
window.addEventListener('MozAfterPaint', this);
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</project>
|
</project>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
<project name="gaia" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||||
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
||||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4addd530e2dc1708745d11d81de21b5d1230ed41"/>
|
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4addd530e2dc1708745d11d81de21b5d1230ed41"/>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"revision": "806d5b997ec768914eaff1c46143c55de2612dbf",
|
"revision": "630d27e5cff74e12e319572dff2b1acd632dc326",
|
||||||
"repo_path": "/integration/gaia-central"
|
"repo_path": "/integration/gaia-central"
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
</project>
|
</project>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
<project name="gaia" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||||
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
<project name="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
||||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4addd530e2dc1708745d11d81de21b5d1230ed41"/>
|
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4addd530e2dc1708745d11d81de21b5d1230ed41"/>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||||
</project>
|
</project>
|
||||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||||
|
|
|
@ -265,7 +265,6 @@ toolbarpaletteitem > #personal-bookmarks > #bookmarks-toolbar-placeholder,
|
||||||
display: -moz-box;
|
display: -moz-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wrapper-urlbar-container > #urlbar-container > #urlbar-wrapper > #urlbar > toolbarbutton,
|
|
||||||
#urlbar-reload-button:not([displaystop]) + #urlbar-stop-button,
|
#urlbar-reload-button:not([displaystop]) + #urlbar-stop-button,
|
||||||
#urlbar-reload-button[displaystop] {
|
#urlbar-reload-button[displaystop] {
|
||||||
visibility: collapse;
|
visibility: collapse;
|
||||||
|
|
|
@ -6433,10 +6433,10 @@ var gIdentityHandler = {
|
||||||
// Chrome URIs however get special treatment. Some chrome URIs are
|
// Chrome URIs however get special treatment. Some chrome URIs are
|
||||||
// whitelisted to provide a positive security signal to the user.
|
// whitelisted to provide a positive security signal to the user.
|
||||||
let chromeWhitelist = ["about:addons", "about:app-manager", "about:config",
|
let chromeWhitelist = ["about:addons", "about:app-manager", "about:config",
|
||||||
"about:crashes", "about:healthreport", "about:home",
|
"about:crashes", "about:customizing", "about:healthreport",
|
||||||
"about:newaddon", "about:permissions", "about:preferences",
|
"about:home", "about:newaddon", "about:permissions",
|
||||||
"about:privatebrowsing", "about:sessionstore",
|
"about:preferences", "about:privatebrowsing",
|
||||||
"about:support", "about:welcomeback"];
|
"about:sessionstore", "about:support", "about:welcomeback"];
|
||||||
let lowercaseSpec = uri.spec.toLowerCase();
|
let lowercaseSpec = uri.spec.toLowerCase();
|
||||||
if (chromeWhitelist.some(function(whitelistedSpec) lowercaseSpec.startsWith(whitelistedSpec))) {
|
if (chromeWhitelist.some(function(whitelistedSpec) lowercaseSpec.startsWith(whitelistedSpec))) {
|
||||||
this.setMode(this.IDENTITY_MODE_CHROMEUI);
|
this.setMode(this.IDENTITY_MODE_CHROMEUI);
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
disablefastfind="true">
|
disablefastfind="true">
|
||||||
<head>
|
<head>
|
||||||
<title>&customizeMode.tabTitle;</title>
|
<title>&customizeMode.tabTitle;</title>
|
||||||
|
<link rel="icon" type="image/x-icon"
|
||||||
|
href="chrome://browser/skin/customizableui/customizeFavicon.ico"/>
|
||||||
</head>
|
</head>
|
||||||
<body></body>
|
<body></body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -607,11 +607,6 @@ let SessionStoreInternal = {
|
||||||
receiveMessage: function ssi_receiveMessage(aMessage) {
|
receiveMessage: function ssi_receiveMessage(aMessage) {
|
||||||
var browser = aMessage.target;
|
var browser = aMessage.target;
|
||||||
var win = browser.ownerDocument.defaultView;
|
var win = browser.ownerDocument.defaultView;
|
||||||
let tab = this._getTabForBrowser(browser);
|
|
||||||
if (!tab) {
|
|
||||||
// Ignore messages from <browser> elements that are not tabs.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (aMessage.name) {
|
switch (aMessage.name) {
|
||||||
case "SessionStore:pageshow":
|
case "SessionStore:pageshow":
|
||||||
|
@ -635,6 +630,7 @@ let SessionStoreInternal = {
|
||||||
case "SessionStore:restoreHistoryComplete":
|
case "SessionStore:restoreHistoryComplete":
|
||||||
if (this.isCurrentEpoch(browser, aMessage.data.epoch)) {
|
if (this.isCurrentEpoch(browser, aMessage.data.epoch)) {
|
||||||
// Notify the tabbrowser that the tab chrome has been restored.
|
// Notify the tabbrowser that the tab chrome has been restored.
|
||||||
|
let tab = this._getTabForBrowser(browser);
|
||||||
let tabData = browser.__SS_data;
|
let tabData = browser.__SS_data;
|
||||||
|
|
||||||
// wall-paper fix for bug 439675: make sure that the URL to be loaded
|
// wall-paper fix for bug 439675: make sure that the URL to be loaded
|
||||||
|
@ -685,6 +681,7 @@ let SessionStoreInternal = {
|
||||||
Services.obs.notifyObservers(browser, NOTIFY_TAB_RESTORED, null);
|
Services.obs.notifyObservers(browser, NOTIFY_TAB_RESTORED, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let tab = this._getTabForBrowser(browser);
|
||||||
if (tab) {
|
if (tab) {
|
||||||
SessionStoreInternal._resetLocalTabRestoringState(tab);
|
SessionStoreInternal._resetLocalTabRestoringState(tab);
|
||||||
SessionStoreInternal.restoreNextTab();
|
SessionStoreInternal.restoreNextTab();
|
||||||
|
@ -706,6 +703,7 @@ let SessionStoreInternal = {
|
||||||
break;
|
break;
|
||||||
case "SessionStore:reloadPendingTab":
|
case "SessionStore:reloadPendingTab":
|
||||||
if (this.isCurrentEpoch(browser, aMessage.data.epoch)) {
|
if (this.isCurrentEpoch(browser, aMessage.data.epoch)) {
|
||||||
|
let tab = this._getTabForBrowser(browser);
|
||||||
if (tab && browser.__SS_restoreState == TAB_STATE_NEEDS_RESTORE) {
|
if (tab && browser.__SS_restoreState == TAB_STATE_NEEDS_RESTORE) {
|
||||||
this.restoreTabContent(tab);
|
this.restoreTabContent(tab);
|
||||||
}
|
}
|
||||||
|
@ -821,12 +819,6 @@ let SessionStoreInternal = {
|
||||||
// internal data about the window.
|
// internal data about the window.
|
||||||
aWindow.__SSi = this._generateWindowID();
|
aWindow.__SSi = this._generateWindowID();
|
||||||
|
|
||||||
let mm = aWindow.messageManager;
|
|
||||||
MESSAGES.forEach(msg => mm.addMessageListener(msg, this));
|
|
||||||
|
|
||||||
// Load the frame script after registering listeners.
|
|
||||||
mm.loadFrameScript("chrome://browser/content/content-sessionStore.js", true);
|
|
||||||
|
|
||||||
// and create its data object
|
// and create its data object
|
||||||
this._windows[aWindow.__SSi] = { tabs: [], selected: 0, _closedTabs: [], busy: false };
|
this._windows[aWindow.__SSi] = { tabs: [], selected: 0, _closedTabs: [], busy: false };
|
||||||
|
|
||||||
|
@ -1351,6 +1343,12 @@ let SessionStoreInternal = {
|
||||||
let browser = aTab.linkedBrowser;
|
let browser = aTab.linkedBrowser;
|
||||||
BROWSER_EVENTS.forEach(msg => browser.addEventListener(msg, this, true));
|
BROWSER_EVENTS.forEach(msg => browser.addEventListener(msg, this, true));
|
||||||
|
|
||||||
|
let mm = browser.messageManager;
|
||||||
|
MESSAGES.forEach(msg => mm.addMessageListener(msg, this));
|
||||||
|
|
||||||
|
// Load the frame script after registering listeners.
|
||||||
|
mm.loadFrameScript("chrome://browser/content/content-sessionStore.js", false);
|
||||||
|
|
||||||
if (!aNoNotification) {
|
if (!aNoNotification) {
|
||||||
this.saveStateDelayed(aWindow);
|
this.saveStateDelayed(aWindow);
|
||||||
}
|
}
|
||||||
|
|
|
@ -982,6 +982,7 @@ var Scratchpad = {
|
||||||
|
|
||||||
this.editor.setText(content);
|
this.editor.setText(content);
|
||||||
this.editor.clearHistory();
|
this.editor.clearHistory();
|
||||||
|
this.dirty = false;
|
||||||
document.getElementById("sp-cmd-revert").setAttribute("disabled", true);
|
document.getElementById("sp-cmd-revert").setAttribute("disabled", true);
|
||||||
}
|
}
|
||||||
else if (!aSilentError) {
|
else if (!aSilentError) {
|
||||||
|
|
|
@ -53,6 +53,9 @@ function fileImported(aStatus, aFileContent)
|
||||||
is(gScratchpad.getText(), gFileContent,
|
is(gScratchpad.getText(), gFileContent,
|
||||||
"the editor content is correct");
|
"the editor content is correct");
|
||||||
|
|
||||||
|
is(gScratchpad.dirty, false,
|
||||||
|
"the editor marks imported file as saved");
|
||||||
|
|
||||||
// Save the file after changes.
|
// Save the file after changes.
|
||||||
gFileContent += "// omg, saved!";
|
gFileContent += "// omg, saved!";
|
||||||
gScratchpad.editor.setText(gFileContent);
|
gScratchpad.editor.setText(gFileContent);
|
||||||
|
|
|
@ -165,6 +165,13 @@ var ContextMenuHandler = {
|
||||||
} else {
|
} else {
|
||||||
Util.dumpLn("error: target element does not support nsIDOMNSEditableElement");
|
Util.dumpLn("error: target element does not support nsIDOMNSEditableElement");
|
||||||
}
|
}
|
||||||
|
} else if (Util.isEditableContent(this._target)) {
|
||||||
|
try {
|
||||||
|
this._target.ownerDocument.execCommand("copy", false);
|
||||||
|
} catch (ex) {
|
||||||
|
dump("ContextMenuHandler: exception copying from contentEditable: " +
|
||||||
|
ex.message + "\n");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let selectionText = this._previousState.string;
|
let selectionText = this._previousState.string;
|
||||||
|
|
||||||
|
|
|
@ -744,7 +744,7 @@ gTests.push({
|
||||||
// Case #2: Document isn't in design mode and text is selected.
|
// Case #2: Document isn't in design mode and text is selected.
|
||||||
tabWindow.getSelection().selectAllChildren(testSpan);
|
tabWindow.getSelection().selectAllChildren(testSpan);
|
||||||
|
|
||||||
let promise = waitForEvent(tabWindow.document, "popupshown");
|
let promise = waitForEvent(document, "popupshown");
|
||||||
sendContextMenuClickToSelection(tabWindow);
|
sendContextMenuClickToSelection(tabWindow);
|
||||||
yield promise;
|
yield promise;
|
||||||
|
|
||||||
|
@ -758,7 +758,7 @@ gTests.push({
|
||||||
tabWindow.document.designMode = "on";
|
tabWindow.document.designMode = "on";
|
||||||
tabWindow.getSelection().removeAllRanges();
|
tabWindow.getSelection().removeAllRanges();
|
||||||
|
|
||||||
promise = waitForEvent(tabWindow.document, "popupshown");
|
promise = waitForEvent(document, "popupshown");
|
||||||
sendContextMenuClickToElement(tabWindow, testSpan);
|
sendContextMenuClickToElement(tabWindow, testSpan);
|
||||||
yield promise;
|
yield promise;
|
||||||
|
|
||||||
|
@ -771,7 +771,7 @@ gTests.push({
|
||||||
// Case #4: Document is in design mode and text is selected.
|
// Case #4: Document is in design mode and text is selected.
|
||||||
tabWindow.getSelection().selectAllChildren(testSpan);
|
tabWindow.getSelection().selectAllChildren(testSpan);
|
||||||
|
|
||||||
promise = waitForEvent(tabWindow.document, "popupshown");
|
promise = waitForEvent(document, "popupshown");
|
||||||
sendContextMenuClickToSelection(tabWindow);
|
sendContextMenuClickToSelection(tabWindow);
|
||||||
yield promise;
|
yield promise;
|
||||||
|
|
||||||
|
@ -787,6 +787,93 @@ gTests.push({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gTests.push({
|
||||||
|
desc: "Bug 961702 - 'Copy' context menu action does not copy rich content " +
|
||||||
|
"while document in design mode (or inside container that allows to " +
|
||||||
|
"edit its content)",
|
||||||
|
run: function test() {
|
||||||
|
info(chromeRoot + "browser_context_menu_tests_05.html");
|
||||||
|
yield addTab(chromeRoot + "browser_context_menu_tests_05.html");
|
||||||
|
|
||||||
|
purgeEventQueue();
|
||||||
|
emptyClipboard();
|
||||||
|
ContextUI.dismiss();
|
||||||
|
|
||||||
|
yield waitForCondition(() => !ContextUI.navbarVisible);
|
||||||
|
|
||||||
|
let tabWindow = Browser.selectedTab.browser.contentWindow;
|
||||||
|
let testDiv = tabWindow.document.getElementById("div1");
|
||||||
|
|
||||||
|
// Case #1: Document is in design mode.
|
||||||
|
tabWindow.document.designMode = "on";
|
||||||
|
|
||||||
|
let promise = waitForEvent(document, "popupshown");
|
||||||
|
sendContextMenuClickToElement(tabWindow, testDiv);
|
||||||
|
yield promise;
|
||||||
|
|
||||||
|
let selectAllMenuItem = document.getElementById("context-select-all");
|
||||||
|
promise = waitForEvent(document, "popuphidden");
|
||||||
|
sendNativeTap(selectAllMenuItem);
|
||||||
|
yield promise;
|
||||||
|
|
||||||
|
promise = waitForEvent(document, "popupshown");
|
||||||
|
sendContextMenuClickToSelection(tabWindow);
|
||||||
|
yield promise;
|
||||||
|
|
||||||
|
let copyMenuItem = document.getElementById("context-copy");
|
||||||
|
promise = waitForEvent(document, "popuphidden");
|
||||||
|
sendNativeTap(copyMenuItem);
|
||||||
|
yield promise;
|
||||||
|
|
||||||
|
// The wait is needed to give time to populate the clipboard.
|
||||||
|
let clipboardContent = "";
|
||||||
|
let contentToCopy = tabWindow.document.body.innerHTML;
|
||||||
|
yield waitForCondition(function () {
|
||||||
|
clipboardContent = SpecialPowers.getClipboardData("text/html");
|
||||||
|
return clipboardContent == contentToCopy;
|
||||||
|
});
|
||||||
|
ok(clipboardContent == contentToCopy, "Rich content copied.");
|
||||||
|
|
||||||
|
// Case #2: Container with editable content.
|
||||||
|
emptyClipboard();
|
||||||
|
tabWindow.document.designMode = "off";
|
||||||
|
tabWindow.getSelection().removeAllRanges();
|
||||||
|
|
||||||
|
promise = waitForEvent(tabWindow.document.body, "focus");
|
||||||
|
sendNativeTap(testDiv);
|
||||||
|
yield promise;
|
||||||
|
|
||||||
|
promise = waitForEvent(document, "popupshown");
|
||||||
|
sendContextMenuClickToElement(tabWindow, testDiv);
|
||||||
|
yield promise;
|
||||||
|
|
||||||
|
selectAllMenuItem = document.getElementById("context-select-all");
|
||||||
|
promise = waitForEvent(document, "popuphidden");
|
||||||
|
sendNativeTap(selectAllMenuItem);
|
||||||
|
yield promise;
|
||||||
|
|
||||||
|
promise = waitForEvent(document, "popupshown");
|
||||||
|
sendContextMenuClickToSelection(tabWindow);
|
||||||
|
yield promise;
|
||||||
|
|
||||||
|
copyMenuItem = document.getElementById("context-copy");
|
||||||
|
promise = waitForEvent(document, "popuphidden");
|
||||||
|
sendNativeTap(copyMenuItem);
|
||||||
|
yield promise;
|
||||||
|
|
||||||
|
// The wait is needed to give time to populate the clipboard.
|
||||||
|
clipboardContent = "";
|
||||||
|
contentToCopy = testDiv.innerHTML;
|
||||||
|
yield waitForCondition(function () {
|
||||||
|
clipboardContent = SpecialPowers.getClipboardData("text/html");
|
||||||
|
return clipboardContent == contentToCopy;
|
||||||
|
});
|
||||||
|
ok(clipboardContent == contentToCopy, "Rich content copied.");
|
||||||
|
|
||||||
|
Browser.closeTab(Browser.selectedTab, { forceClose: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
setDevPixelEqualToPx();
|
setDevPixelEqualToPx();
|
||||||
runTests();
|
runTests();
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body style="padding: 10px; margin: 10px;">
|
||||||
|
<span id="text1">Test text</span>
|
||||||
|
<div contenteditable="true" id="div1" style="border: 2px solid blue; width: 200px; height: 200px;">
|
||||||
|
<table>
|
||||||
|
<tr><td>Test content</td></tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -4,6 +4,7 @@ support-files =
|
||||||
browser_context_menu_tests_02.html
|
browser_context_menu_tests_02.html
|
||||||
browser_context_menu_tests_03.html
|
browser_context_menu_tests_03.html
|
||||||
browser_context_menu_tests_04.html
|
browser_context_menu_tests_04.html
|
||||||
|
browser_context_menu_tests_05.html
|
||||||
browser_findbar.html
|
browser_findbar.html
|
||||||
browser_form_auto_complete.html
|
browser_form_auto_complete.html
|
||||||
browser_form_selects.html
|
browser_form_selects.html
|
||||||
|
|
|
@ -27,6 +27,7 @@ browser.jar:
|
||||||
skin/classic/browser/customizableui/customizeMode-gridTexture.png (customizableui/customizeMode-gridTexture.png)
|
skin/classic/browser/customizableui/customizeMode-gridTexture.png (customizableui/customizeMode-gridTexture.png)
|
||||||
skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.png)
|
skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.png)
|
||||||
skin/classic/browser/customizableui/customizeMode-separatorVertical.png (customizableui/customizeMode-separatorVertical.png)
|
skin/classic/browser/customizableui/customizeMode-separatorVertical.png (customizableui/customizeMode-separatorVertical.png)
|
||||||
|
skin/classic/browser/customizableui/customizeFavicon.ico (../shared/customizableui/customizeFavicon.ico)
|
||||||
* skin/classic/browser/engineManager.css
|
* skin/classic/browser/engineManager.css
|
||||||
skin/classic/browser/fullscreen-darknoise.png
|
skin/classic/browser/fullscreen-darknoise.png
|
||||||
skin/classic/browser/Geolocation-16.png
|
skin/classic/browser/Geolocation-16.png
|
||||||
|
|
|
@ -27,6 +27,7 @@ browser.jar:
|
||||||
skin/classic/browser/customizableui/customizeMode-gridTexture.png (customizableui/customizeMode-gridTexture.png)
|
skin/classic/browser/customizableui/customizeMode-gridTexture.png (customizableui/customizeMode-gridTexture.png)
|
||||||
skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.png)
|
skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.png)
|
||||||
skin/classic/browser/customizableui/customizeMode-separatorVertical.png (customizableui/customizeMode-separatorVertical.png)
|
skin/classic/browser/customizableui/customizeMode-separatorVertical.png (customizableui/customizeMode-separatorVertical.png)
|
||||||
|
skin/classic/browser/customizableui/customizeFavicon.ico (../shared/customizableui/customizeFavicon.ico)
|
||||||
* skin/classic/browser/engineManager.css (engineManager.css)
|
* skin/classic/browser/engineManager.css (engineManager.css)
|
||||||
skin/classic/browser/fullscreen-darknoise.png
|
skin/classic/browser/fullscreen-darknoise.png
|
||||||
skin/classic/browser/Geolocation-16.png
|
skin/classic/browser/Geolocation-16.png
|
||||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -5,7 +5,6 @@
|
||||||
%filter substitution
|
%filter substitution
|
||||||
|
|
||||||
%define menuPanelWidth 22.35em
|
%define menuPanelWidth 22.35em
|
||||||
%define panelTextSize 1rem
|
|
||||||
%define exitSubviewGutterWidth 38px
|
%define exitSubviewGutterWidth 38px
|
||||||
%define buttonStateHover :not(:-moz-any([disabled],[checked="true"],[open],:active)):hover
|
%define buttonStateHover :not(:-moz-any([disabled],[checked="true"],[open],:active)):hover
|
||||||
%define buttonStateActive :not([disabled]):-moz-any([open],[checked="true"],:hover:active)
|
%define buttonStateActive :not([disabled]):-moz-any([open],[checked="true"],:hover:active)
|
||||||
|
@ -67,16 +66,8 @@
|
||||||
padding: .5em 0;
|
padding: .5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbaritem[cui-areatype="menu-panel"][sdkstylewidget="true"]:not(.panel-wide-item) > .toolbarbutton-text,
|
|
||||||
.panelUI-grid .panel-combined-button > .toolbarbutton-text,
|
|
||||||
.widget-overflow-list .toolbarbutton-menubutton-button > .toolbarbutton-text,
|
|
||||||
.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-text {
|
|
||||||
font-size: @panelTextSize@;
|
|
||||||
}
|
|
||||||
|
|
||||||
.panelUI-grid .toolbarbutton-menubutton-button > .toolbarbutton-multiline-text,
|
.panelUI-grid .toolbarbutton-menubutton-button > .toolbarbutton-multiline-text,
|
||||||
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-multiline-text {
|
.panelUI-grid .toolbarbutton-1 > .toolbarbutton-multiline-text {
|
||||||
font-size: @panelTextSize@;
|
|
||||||
margin: 2px 0 0;
|
margin: 2px 0 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
-moz-hyphens: auto;
|
-moz-hyphens: auto;
|
||||||
|
|
|
@ -29,6 +29,7 @@ browser.jar:
|
||||||
skin/classic/browser/customizableui/customizeMode-gridTexture.png (customizableui/customizeMode-gridTexture.png)
|
skin/classic/browser/customizableui/customizeMode-gridTexture.png (customizableui/customizeMode-gridTexture.png)
|
||||||
skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.png)
|
skin/classic/browser/customizableui/customizeMode-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.png)
|
||||||
skin/classic/browser/customizableui/customizeMode-separatorVertical.png (customizableui/customizeMode-separatorVertical.png)
|
skin/classic/browser/customizableui/customizeMode-separatorVertical.png (customizableui/customizeMode-separatorVertical.png)
|
||||||
|
skin/classic/browser/customizableui/customizeFavicon.ico (../shared/customizableui/customizeFavicon.ico)
|
||||||
* skin/classic/browser/engineManager.css
|
* skin/classic/browser/engineManager.css
|
||||||
skin/classic/browser/fullscreen-darknoise.png
|
skin/classic/browser/fullscreen-darknoise.png
|
||||||
skin/classic/browser/Geolocation-16.png
|
skin/classic/browser/Geolocation-16.png
|
||||||
|
|
|
@ -1569,9 +1569,9 @@ int64_t MediaDecoder::VideoQueueMemoryInUse() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t MediaDecoder::AudioQueueMemoryInUse() {
|
size_t MediaDecoder::SizeOfAudioQueue() {
|
||||||
if (mDecoderStateMachine) {
|
if (mDecoderStateMachine) {
|
||||||
return mDecoderStateMachine->AudioQueueMemoryInUse();
|
return mDecoderStateMachine->SizeOfAudioQueue();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1826,7 +1826,7 @@ MediaMemoryTracker::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||||
DecodersArray& decoders = Decoders();
|
DecodersArray& decoders = Decoders();
|
||||||
for (size_t i = 0; i < decoders.Length(); ++i) {
|
for (size_t i = 0; i < decoders.Length(); ++i) {
|
||||||
video += decoders[i]->VideoQueueMemoryInUse();
|
video += decoders[i]->VideoQueueMemoryInUse();
|
||||||
audio += decoders[i]->AudioQueueMemoryInUse();
|
audio += decoders[i]->SizeOfAudioQueue();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define REPORT(_path, _amount, _desc) \
|
#define REPORT(_path, _amount, _desc) \
|
||||||
|
|
|
@ -642,7 +642,7 @@ public:
|
||||||
// Returns the size, in bytes, of the heap memory used by the currently
|
// Returns the size, in bytes, of the heap memory used by the currently
|
||||||
// queued decoded video and audio data.
|
// queued decoded video and audio data.
|
||||||
virtual int64_t VideoQueueMemoryInUse();
|
virtual int64_t VideoQueueMemoryInUse();
|
||||||
virtual int64_t AudioQueueMemoryInUse();
|
size_t SizeOfAudioQueue();
|
||||||
|
|
||||||
VideoFrameContainer* GetVideoFrameContainer() MOZ_FINAL MOZ_OVERRIDE
|
VideoFrameContainer* GetVideoFrameContainer() MOZ_FINAL MOZ_OVERRIDE
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include "AudioSampleFormat.h"
|
#include "AudioSampleFormat.h"
|
||||||
#include "AbstractMediaDecoder.h"
|
#include "AbstractMediaDecoder.h"
|
||||||
#include "ImageTypes.h"
|
#include "ImageTypes.h"
|
||||||
|
#include "nsIMemoryReporter.h"
|
||||||
|
|
||||||
struct nsIntRect;
|
struct nsIntRect;
|
||||||
|
|
||||||
|
@ -154,6 +155,14 @@ public:
|
||||||
MOZ_COUNT_DTOR(AudioData);
|
MOZ_COUNT_DTOR(AudioData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
|
||||||
|
size_t size = aMallocSizeOf(this) + aMallocSizeOf(mAudioData);
|
||||||
|
if (mAudioBuffer) {
|
||||||
|
size += mAudioBuffer->SizeOfIncludingThis(aMallocSizeOf);
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
// If mAudioBuffer is null, creates it from mAudioData.
|
// If mAudioBuffer is null, creates it from mAudioData.
|
||||||
void EnsureAudioBuffer();
|
void EnsureAudioBuffer();
|
||||||
|
|
||||||
|
@ -582,21 +591,23 @@ public:
|
||||||
|
|
||||||
class AudioQueueMemoryFunctor : public nsDequeFunctor {
|
class AudioQueueMemoryFunctor : public nsDequeFunctor {
|
||||||
public:
|
public:
|
||||||
AudioQueueMemoryFunctor() : mResult(0) {}
|
AudioQueueMemoryFunctor() : mSize(0) {}
|
||||||
|
|
||||||
|
MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf);
|
||||||
|
|
||||||
virtual void* operator()(void* anObject) {
|
virtual void* operator()(void* anObject) {
|
||||||
const AudioData* audioData = static_cast<const AudioData*>(anObject);
|
const AudioData* audioData = static_cast<const AudioData*>(anObject);
|
||||||
mResult += audioData->mFrames * audioData->mChannels * sizeof(AudioDataValue);
|
mSize += audioData->SizeOfIncludingThis(MallocSizeOf);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t mResult;
|
size_t mSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual int64_t AudioQueueMemoryInUse() {
|
size_t SizeOfAudioQueue() {
|
||||||
AudioQueueMemoryFunctor functor;
|
AudioQueueMemoryFunctor functor;
|
||||||
mAudioQueue.LockedForEach(functor);
|
mAudioQueue.LockedForEach(functor);
|
||||||
return functor.mResult;
|
return functor.mSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only used by WebMReader and MediaOmxReader for now, so stub here rather
|
// Only used by WebMReader and MediaOmxReader for now, so stub here rather
|
||||||
|
|
|
@ -267,9 +267,9 @@ public:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t AudioQueueMemoryInUse() {
|
size_t SizeOfAudioQueue() {
|
||||||
if (mReader) {
|
if (mReader) {
|
||||||
return mReader->AudioQueueMemoryInUse();
|
return mReader->SizeOfAudioQueue();
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,10 @@ public:
|
||||||
return p.forget();
|
return p.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
|
||||||
|
return aMallocSizeOf(this);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SharedBuffer() {}
|
SharedBuffer() {}
|
||||||
};
|
};
|
||||||
|
|
|
@ -676,6 +676,14 @@ BluetoothA2dpManager::HandleSinkPropertyChanged(const BluetoothSignal& aSignal)
|
||||||
BluetoothValue::TArrayOfBluetoothNamedValue);
|
BluetoothValue::TArrayOfBluetoothNamedValue);
|
||||||
|
|
||||||
const nsString& address = aSignal.path();
|
const nsString& address = aSignal.path();
|
||||||
|
/**
|
||||||
|
* Update sink property only if
|
||||||
|
* - mDeviceAddress is empty (A2dp is disconnected), or
|
||||||
|
* - this property change is from the connected sink.
|
||||||
|
*/
|
||||||
|
NS_ENSURE_TRUE_VOID(mDeviceAddress.IsEmpty() ||
|
||||||
|
mDeviceAddress.Equals(address));
|
||||||
|
|
||||||
const InfallibleTArray<BluetoothNamedValue>& arr =
|
const InfallibleTArray<BluetoothNamedValue>& arr =
|
||||||
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
||||||
MOZ_ASSERT(arr.Length() == 1);
|
MOZ_ASSERT(arr.Length() == 1);
|
||||||
|
|
|
@ -257,6 +257,14 @@ BluetoothA2dpManager::HandleSinkPropertyChanged(const BluetoothSignal& aSignal)
|
||||||
MOZ_ASSERT(aSignal.value().type() == BluetoothValue::TArrayOfBluetoothNamedValue);
|
MOZ_ASSERT(aSignal.value().type() == BluetoothValue::TArrayOfBluetoothNamedValue);
|
||||||
|
|
||||||
const nsString& address = aSignal.path();
|
const nsString& address = aSignal.path();
|
||||||
|
/**
|
||||||
|
* Update sink property only if
|
||||||
|
* - mDeviceAddress is empty (A2dp is disconnected), or
|
||||||
|
* - this property change is from the connected sink.
|
||||||
|
*/
|
||||||
|
NS_ENSURE_TRUE_VOID(mDeviceAddress.IsEmpty() ||
|
||||||
|
mDeviceAddress.Equals(address));
|
||||||
|
|
||||||
const InfallibleTArray<BluetoothNamedValue>& arr =
|
const InfallibleTArray<BluetoothNamedValue>& arr =
|
||||||
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
||||||
MOZ_ASSERT(arr.Length() == 1);
|
MOZ_ASSERT(arr.Length() == 1);
|
||||||
|
|
|
@ -293,8 +293,16 @@ void
|
||||||
WifiProxyService::DispatchWifiEvent(const nsAString& aEvent, const nsACString& aInterface)
|
WifiProxyService::DispatchWifiEvent(const nsAString& aEvent, const nsACString& aInterface)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
nsAutoString event;
|
||||||
|
if (StringBeginsWith(aEvent, NS_LITERAL_STRING("IFNAME"))) {
|
||||||
|
// Jump over IFNAME for gonk-kk.
|
||||||
|
event = Substring(aEvent, aEvent.FindChar(' ') + 1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
event = aEvent;
|
||||||
|
}
|
||||||
// Call the listener.
|
// Call the listener.
|
||||||
mListener->OnWaitEvent(aEvent, aInterface);
|
mListener->OnWaitEvent(event, aInterface);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(WifiProxyService,
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(WifiProxyService,
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
#define BUFFER_SIZE 4096
|
#define BUFFER_SIZE 4096
|
||||||
|
#define COMMAND_SIZE 256
|
||||||
#define PROPERTY_VALUE_MAX 80
|
#define PROPERTY_VALUE_MAX 80
|
||||||
|
|
||||||
// Intentionally not trying to dlclose() this handle. That's playing
|
// Intentionally not trying to dlclose() this handle. That's playing
|
||||||
|
@ -237,6 +238,20 @@ public:
|
||||||
USE_DLFUNC(wifi_stop_supplicant)
|
USE_DLFUNC(wifi_stop_supplicant)
|
||||||
return wifi_stop_supplicant(arg);
|
return wifi_stop_supplicant(arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINE_DLFUNC(wifi_command, int32_t, const char*, char*, size_t*)
|
||||||
|
int32_t do_wifi_command(const char* iface, const char* cmd, char* buf, size_t* len) {
|
||||||
|
char command[COMMAND_SIZE];
|
||||||
|
if (!strcmp(iface, "p2p0")) {
|
||||||
|
// Commands for p2p0 interface don't need prefix
|
||||||
|
snprintf(command, COMMAND_SIZE, "%s", cmd);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
snprintf(command, COMMAND_SIZE, "IFNAME=%s %s", iface, cmd);
|
||||||
|
}
|
||||||
|
USE_DLFUNC(wifi_command)
|
||||||
|
return wifi_command(command, buf, len);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Concrete class to use to access the wpa supplicant.
|
// Concrete class to use to access the wpa supplicant.
|
||||||
|
|
|
@ -143,10 +143,15 @@ SourceSurfaceD2DTarget::GetBitmap(ID2D1RenderTarget *aRT)
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
// This seems to happen for SurfaceFormat::A8 sometimes...
|
// This seems to happen for SurfaceFormat::A8 sometimes...
|
||||||
aRT->CreateBitmap(D2D1::SizeU(desc.Width, desc.Height),
|
hr = aRT->CreateBitmap(D2D1::SizeU(desc.Width, desc.Height),
|
||||||
D2D1::BitmapProperties(D2DPixelFormat(mFormat)),
|
D2D1::BitmapProperties(D2DPixelFormat(mFormat)),
|
||||||
byRef(mBitmap));
|
byRef(mBitmap));
|
||||||
|
|
||||||
|
if (FAILED(hr)) {
|
||||||
|
gfxWarning() << "Failed in CreateBitmap. Code: " << hr;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
RefPtr<ID2D1RenderTarget> rt;
|
RefPtr<ID2D1RenderTarget> rt;
|
||||||
|
|
||||||
if (mDrawTarget) {
|
if (mDrawTarget) {
|
||||||
|
|
|
@ -685,8 +685,8 @@ CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||||
|
|
||||||
UpdateRenderTarget();
|
UpdateRenderTarget();
|
||||||
|
|
||||||
// Failed to create a render target.
|
// Failed to create a render target or the view.
|
||||||
if (!mDefaultRT ||
|
if (!mDefaultRT || !mDefaultRT->mRTView ||
|
||||||
mSize.width == 0 || mSize.height == 0) {
|
mSize.width == 0 || mSize.height == 0) {
|
||||||
*aRenderBoundsOut = Rect();
|
*aRenderBoundsOut = Rect();
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -83,6 +83,8 @@
|
||||||
android:debuggable="true">
|
android:debuggable="true">
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
<!-- If the windowSoftInputMode adjust* flag changes below, the
|
||||||
|
setSoftInputMode call in BrowserSearch#onStop must also be updated. -->
|
||||||
<activity android:name=".App"
|
<activity android:name=".App"
|
||||||
android:label="@MOZ_APP_DISPLAYNAME@"
|
android:label="@MOZ_APP_DISPLAYNAME@"
|
||||||
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
|
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
|
||||||
|
|
|
@ -42,6 +42,7 @@ import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.ViewStub;
|
import android.view.ViewStub;
|
||||||
|
import android.view.WindowManager;
|
||||||
import android.view.WindowManager.LayoutParams;
|
import android.view.WindowManager.LayoutParams;
|
||||||
import android.view.animation.AccelerateInterpolator;
|
import android.view.animation.AccelerateInterpolator;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
||||||
|
@ -53,7 +54,6 @@ import android.widget.TextView;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fragment that displays frecency search results in a ListView.
|
* Fragment that displays frecency search results in a ListView.
|
||||||
|
@ -110,9 +110,6 @@ public class BrowserSearch extends HomeFragment
|
||||||
// Callbacks used for the search suggestion loader
|
// Callbacks used for the search suggestion loader
|
||||||
private SuggestionLoaderCallbacks mSuggestionLoaderCallbacks;
|
private SuggestionLoaderCallbacks mSuggestionLoaderCallbacks;
|
||||||
|
|
||||||
// Inflater used by the adapter
|
|
||||||
private LayoutInflater mInflater;
|
|
||||||
|
|
||||||
// Autocomplete handler used when filtering results
|
// Autocomplete handler used when filtering results
|
||||||
private AutocompleteHandler mAutocompleteHandler;
|
private AutocompleteHandler mAutocompleteHandler;
|
||||||
|
|
||||||
|
@ -177,15 +174,12 @@ public class BrowserSearch extends HomeFragment
|
||||||
throw new ClassCastException(activity.toString()
|
throw new ClassCastException(activity.toString()
|
||||||
+ " must implement BrowserSearch.OnEditSuggestionListener");
|
+ " must implement BrowserSearch.OnEditSuggestionListener");
|
||||||
}
|
}
|
||||||
|
|
||||||
mInflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDetach() {
|
public void onDetach() {
|
||||||
super.onDetach();
|
super.onDetach();
|
||||||
|
|
||||||
mInflater = null;
|
|
||||||
mAutocompleteHandler = null;
|
mAutocompleteHandler = null;
|
||||||
mUrlOpenListener = null;
|
mUrlOpenListener = null;
|
||||||
mSearchListener = null;
|
mSearchListener = null;
|
||||||
|
@ -206,6 +200,23 @@ public class BrowserSearch extends HomeFragment
|
||||||
mSearchEngines = null;
|
mSearchEngines = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStart() {
|
||||||
|
super.onStart();
|
||||||
|
|
||||||
|
// Adjusting the window size when showing the keyboard results in the underlying
|
||||||
|
// activity being painted when the keyboard is hidden (bug 933422). This can be
|
||||||
|
// prevented by not resizing the window.
|
||||||
|
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStop() {
|
||||||
|
super.onStop();
|
||||||
|
|
||||||
|
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
// All list views are styled to look the same with a global activity theme.
|
// All list views are styled to look the same with a global activity theme.
|
||||||
|
|
|
@ -21,7 +21,6 @@ import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -51,7 +50,7 @@ public class PanelManager implements GeckoEventListener {
|
||||||
private static AtomicInteger sRequestId = new AtomicInteger(0);
|
private static AtomicInteger sRequestId = new AtomicInteger(0);
|
||||||
|
|
||||||
// Stores set of pending request callbacks.
|
// Stores set of pending request callbacks.
|
||||||
private static final Map<Integer, RequestCallback> sCallbacks = Collections.synchronizedMap(new HashMap<Integer, RequestCallback>());
|
private static final Map<Integer, RequestCallback> sCallbacks = new HashMap<Integer, RequestCallback>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Asynchronously fetches list of available panels from Gecko.
|
* Asynchronously fetches list of available panels from Gecko.
|
||||||
|
|
|
@ -133,8 +133,7 @@ panel[type="arrow"][side="right"] {
|
||||||
@media (-moz-windows-default-theme) {
|
@media (-moz-windows-default-theme) {
|
||||||
.panel-arrowcontent {
|
.panel-arrowcontent {
|
||||||
border-color: hsla(210,4%,10%,.2);
|
border-color: hsla(210,4%,10%,.2);
|
||||||
box-shadow: 0 3px 5px hsla(210,4%,10%,.1),
|
box-shadow: 0 0 4px hsla(210,4%,10%,.2);
|
||||||
0 0 7px hsla(210,4%,10%,.1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-arrow[side="top"],
|
.panel-arrow[side="top"],
|
||||||
|
|
Загрузка…
Ссылка в новой задаче