mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge mozilla-central to mozilla-inbound
This commit is contained in:
commit
ba7db7c546
@ -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) {
|
||||
// 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", {})
|
||||
.devtools.require;
|
||||
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();
|
||||
});
|
||||
|
@ -296,14 +296,22 @@ var shell = {
|
||||
.sessionHistory = Cc["@mozilla.org/browser/shistory;1"]
|
||||
.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
|
||||
// And send them to Gaia via mozChromeEvents.
|
||||
// Ideally, hardware buttons wouldn't generate key events at all, or
|
||||
// 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
|
||||
window.addEventListener('keydown', this, true);
|
||||
window.addEventListener('keypress', this, true);
|
||||
window.addEventListener('keyup', this, true);
|
||||
chromeEventHandler.addEventListener('keydown', this, true);
|
||||
chromeEventHandler.addEventListener('keypress', this, true);
|
||||
chromeEventHandler.addEventListener('keyup', this, true);
|
||||
|
||||
window.addEventListener('MozApplicationManifest', this);
|
||||
window.addEventListener('mozfullscreenchange', this);
|
||||
window.addEventListener('MozAfterPaint', this);
|
||||
|
@ -12,7 +12,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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<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="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4addd530e2dc1708745d11d81de21b5d1230ed41"/>
|
||||
|
@ -12,7 +12,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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<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"
|
||||
}
|
||||
|
@ -11,7 +11,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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -10,7 +10,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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -12,7 +12,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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -11,7 +11,7 @@
|
||||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<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="moztt" path="external/moztt" remote="b2g" revision="96d2d00165f4561fbde62d1062706eab74b3a01f"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4addd530e2dc1708745d11d81de21b5d1230ed41"/>
|
||||
|
@ -11,7 +11,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="afa75c6f431b00a2cee83c48f1bf986fc1cd6df1"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="00d8d05f0d0730a3cbf17635ad6a6b197a2ce7c9"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="e9b6626eddbc85873eaa2a9174a9bd5101e5c05f"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>
|
||||
|
@ -265,7 +265,6 @@ toolbarpaletteitem > #personal-bookmarks > #bookmarks-toolbar-placeholder,
|
||||
display: -moz-box;
|
||||
}
|
||||
|
||||
#wrapper-urlbar-container > #urlbar-container > #urlbar-wrapper > #urlbar > toolbarbutton,
|
||||
#urlbar-reload-button:not([displaystop]) + #urlbar-stop-button,
|
||||
#urlbar-reload-button[displaystop] {
|
||||
visibility: collapse;
|
||||
|
@ -6433,10 +6433,10 @@ var gIdentityHandler = {
|
||||
// Chrome URIs however get special treatment. Some chrome URIs are
|
||||
// whitelisted to provide a positive security signal to the user.
|
||||
let chromeWhitelist = ["about:addons", "about:app-manager", "about:config",
|
||||
"about:crashes", "about:healthreport", "about:home",
|
||||
"about:newaddon", "about:permissions", "about:preferences",
|
||||
"about:privatebrowsing", "about:sessionstore",
|
||||
"about:support", "about:welcomeback"];
|
||||
"about:crashes", "about:customizing", "about:healthreport",
|
||||
"about:home", "about:newaddon", "about:permissions",
|
||||
"about:preferences", "about:privatebrowsing",
|
||||
"about:sessionstore", "about:support", "about:welcomeback"];
|
||||
let lowercaseSpec = uri.spec.toLowerCase();
|
||||
if (chromeWhitelist.some(function(whitelistedSpec) lowercaseSpec.startsWith(whitelistedSpec))) {
|
||||
this.setMode(this.IDENTITY_MODE_CHROMEUI);
|
||||
|
@ -18,6 +18,8 @@
|
||||
disablefastfind="true">
|
||||
<head>
|
||||
<title>&customizeMode.tabTitle;</title>
|
||||
<link rel="icon" type="image/x-icon"
|
||||
href="chrome://browser/skin/customizableui/customizeFavicon.ico"/>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
|
@ -607,11 +607,6 @@ let SessionStoreInternal = {
|
||||
receiveMessage: function ssi_receiveMessage(aMessage) {
|
||||
var browser = aMessage.target;
|
||||
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) {
|
||||
case "SessionStore:pageshow":
|
||||
@ -635,6 +630,7 @@ let SessionStoreInternal = {
|
||||
case "SessionStore:restoreHistoryComplete":
|
||||
if (this.isCurrentEpoch(browser, aMessage.data.epoch)) {
|
||||
// Notify the tabbrowser that the tab chrome has been restored.
|
||||
let tab = this._getTabForBrowser(browser);
|
||||
let tabData = browser.__SS_data;
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
let tab = this._getTabForBrowser(browser);
|
||||
if (tab) {
|
||||
SessionStoreInternal._resetLocalTabRestoringState(tab);
|
||||
SessionStoreInternal.restoreNextTab();
|
||||
@ -706,6 +703,7 @@ let SessionStoreInternal = {
|
||||
break;
|
||||
case "SessionStore:reloadPendingTab":
|
||||
if (this.isCurrentEpoch(browser, aMessage.data.epoch)) {
|
||||
let tab = this._getTabForBrowser(browser);
|
||||
if (tab && browser.__SS_restoreState == TAB_STATE_NEEDS_RESTORE) {
|
||||
this.restoreTabContent(tab);
|
||||
}
|
||||
@ -821,12 +819,6 @@ let SessionStoreInternal = {
|
||||
// internal data about the window.
|
||||
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
|
||||
this._windows[aWindow.__SSi] = { tabs: [], selected: 0, _closedTabs: [], busy: false };
|
||||
|
||||
@ -1351,6 +1343,12 @@ let SessionStoreInternal = {
|
||||
let browser = aTab.linkedBrowser;
|
||||
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) {
|
||||
this.saveStateDelayed(aWindow);
|
||||
}
|
||||
|
@ -982,6 +982,7 @@ var Scratchpad = {
|
||||
|
||||
this.editor.setText(content);
|
||||
this.editor.clearHistory();
|
||||
this.dirty = false;
|
||||
document.getElementById("sp-cmd-revert").setAttribute("disabled", true);
|
||||
}
|
||||
else if (!aSilentError) {
|
||||
|
@ -53,6 +53,9 @@ function fileImported(aStatus, aFileContent)
|
||||
is(gScratchpad.getText(), gFileContent,
|
||||
"the editor content is correct");
|
||||
|
||||
is(gScratchpad.dirty, false,
|
||||
"the editor marks imported file as saved");
|
||||
|
||||
// Save the file after changes.
|
||||
gFileContent += "// omg, saved!";
|
||||
gScratchpad.editor.setText(gFileContent);
|
||||
|
@ -165,6 +165,13 @@ var ContextMenuHandler = {
|
||||
} else {
|
||||
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 {
|
||||
let selectionText = this._previousState.string;
|
||||
|
||||
|
@ -744,7 +744,7 @@ gTests.push({
|
||||
// Case #2: Document isn't in design mode and text is selected.
|
||||
tabWindow.getSelection().selectAllChildren(testSpan);
|
||||
|
||||
let promise = waitForEvent(tabWindow.document, "popupshown");
|
||||
let promise = waitForEvent(document, "popupshown");
|
||||
sendContextMenuClickToSelection(tabWindow);
|
||||
yield promise;
|
||||
|
||||
@ -758,7 +758,7 @@ gTests.push({
|
||||
tabWindow.document.designMode = "on";
|
||||
tabWindow.getSelection().removeAllRanges();
|
||||
|
||||
promise = waitForEvent(tabWindow.document, "popupshown");
|
||||
promise = waitForEvent(document, "popupshown");
|
||||
sendContextMenuClickToElement(tabWindow, testSpan);
|
||||
yield promise;
|
||||
|
||||
@ -771,7 +771,7 @@ gTests.push({
|
||||
// Case #4: Document is in design mode and text is selected.
|
||||
tabWindow.getSelection().selectAllChildren(testSpan);
|
||||
|
||||
promise = waitForEvent(tabWindow.document, "popupshown");
|
||||
promise = waitForEvent(document, "popupshown");
|
||||
sendContextMenuClickToSelection(tabWindow);
|
||||
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() {
|
||||
setDevPixelEqualToPx();
|
||||
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_03.html
|
||||
browser_context_menu_tests_04.html
|
||||
browser_context_menu_tests_05.html
|
||||
browser_findbar.html
|
||||
browser_form_auto_complete.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-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.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/fullscreen-darknoise.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-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.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/fullscreen-darknoise.png
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
|
BIN
browser/themes/shared/customizableui/customizeFavicon.ico
Normal file
BIN
browser/themes/shared/customizableui/customizeFavicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -5,7 +5,6 @@
|
||||
%filter substitution
|
||||
|
||||
%define menuPanelWidth 22.35em
|
||||
%define panelTextSize 1rem
|
||||
%define exitSubviewGutterWidth 38px
|
||||
%define buttonStateHover :not(:-moz-any([disabled],[checked="true"],[open],:active)):hover
|
||||
%define buttonStateActive :not([disabled]):-moz-any([open],[checked="true"],:hover:active)
|
||||
@ -67,16 +66,8 @@
|
||||
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-1 > .toolbarbutton-multiline-text {
|
||||
font-size: @panelTextSize@;
|
||||
margin: 2px 0 0;
|
||||
text-align: center;
|
||||
-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-separatorHorizontal.png (customizableui/customizeMode-separatorHorizontal.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/fullscreen-darknoise.png
|
||||
skin/classic/browser/Geolocation-16.png
|
||||
|
@ -1569,9 +1569,9 @@ int64_t MediaDecoder::VideoQueueMemoryInUse() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t MediaDecoder::AudioQueueMemoryInUse() {
|
||||
size_t MediaDecoder::SizeOfAudioQueue() {
|
||||
if (mDecoderStateMachine) {
|
||||
return mDecoderStateMachine->AudioQueueMemoryInUse();
|
||||
return mDecoderStateMachine->SizeOfAudioQueue();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -1826,7 +1826,7 @@ MediaMemoryTracker::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
DecodersArray& decoders = Decoders();
|
||||
for (size_t i = 0; i < decoders.Length(); ++i) {
|
||||
video += decoders[i]->VideoQueueMemoryInUse();
|
||||
audio += decoders[i]->AudioQueueMemoryInUse();
|
||||
audio += decoders[i]->SizeOfAudioQueue();
|
||||
}
|
||||
|
||||
#define REPORT(_path, _amount, _desc) \
|
||||
|
@ -642,7 +642,7 @@ public:
|
||||
// Returns the size, in bytes, of the heap memory used by the currently
|
||||
// queued decoded video and audio data.
|
||||
virtual int64_t VideoQueueMemoryInUse();
|
||||
virtual int64_t AudioQueueMemoryInUse();
|
||||
size_t SizeOfAudioQueue();
|
||||
|
||||
VideoFrameContainer* GetVideoFrameContainer() MOZ_FINAL MOZ_OVERRIDE
|
||||
{
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include "AudioSampleFormat.h"
|
||||
#include "AbstractMediaDecoder.h"
|
||||
#include "ImageTypes.h"
|
||||
#include "nsIMemoryReporter.h"
|
||||
|
||||
struct nsIntRect;
|
||||
|
||||
@ -154,6 +155,14 @@ public:
|
||||
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.
|
||||
void EnsureAudioBuffer();
|
||||
|
||||
@ -582,21 +591,23 @@ public:
|
||||
|
||||
class AudioQueueMemoryFunctor : public nsDequeFunctor {
|
||||
public:
|
||||
AudioQueueMemoryFunctor() : mResult(0) {}
|
||||
AudioQueueMemoryFunctor() : mSize(0) {}
|
||||
|
||||
MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf);
|
||||
|
||||
virtual void* operator()(void* anObject) {
|
||||
const AudioData* audioData = static_cast<const AudioData*>(anObject);
|
||||
mResult += audioData->mFrames * audioData->mChannels * sizeof(AudioDataValue);
|
||||
mSize += audioData->SizeOfIncludingThis(MallocSizeOf);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int64_t mResult;
|
||||
size_t mSize;
|
||||
};
|
||||
|
||||
virtual int64_t AudioQueueMemoryInUse() {
|
||||
size_t SizeOfAudioQueue() {
|
||||
AudioQueueMemoryFunctor functor;
|
||||
mAudioQueue.LockedForEach(functor);
|
||||
return functor.mResult;
|
||||
return functor.mSize;
|
||||
}
|
||||
|
||||
// Only used by WebMReader and MediaOmxReader for now, so stub here rather
|
||||
|
@ -267,9 +267,9 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
int64_t AudioQueueMemoryInUse() {
|
||||
size_t SizeOfAudioQueue() {
|
||||
if (mReader) {
|
||||
return mReader->AudioQueueMemoryInUse();
|
||||
return mReader->SizeOfAudioQueue();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -43,6 +43,10 @@ public:
|
||||
return p.forget();
|
||||
}
|
||||
|
||||
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
|
||||
return aMallocSizeOf(this);
|
||||
}
|
||||
|
||||
private:
|
||||
SharedBuffer() {}
|
||||
};
|
||||
|
@ -676,6 +676,14 @@ BluetoothA2dpManager::HandleSinkPropertyChanged(const BluetoothSignal& aSignal)
|
||||
BluetoothValue::TArrayOfBluetoothNamedValue);
|
||||
|
||||
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 =
|
||||
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
||||
MOZ_ASSERT(arr.Length() == 1);
|
||||
|
@ -257,6 +257,14 @@ BluetoothA2dpManager::HandleSinkPropertyChanged(const BluetoothSignal& aSignal)
|
||||
MOZ_ASSERT(aSignal.value().type() == BluetoothValue::TArrayOfBluetoothNamedValue);
|
||||
|
||||
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 =
|
||||
aSignal.value().get_ArrayOfBluetoothNamedValue();
|
||||
MOZ_ASSERT(arr.Length() == 1);
|
||||
|
@ -293,8 +293,16 @@ void
|
||||
WifiProxyService::DispatchWifiEvent(const nsAString& aEvent, const nsACString& aInterface)
|
||||
{
|
||||
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.
|
||||
mListener->OnWaitEvent(aEvent, aInterface);
|
||||
mListener->OnWaitEvent(event, aInterface);
|
||||
}
|
||||
|
||||
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(WifiProxyService,
|
||||
|
@ -12,6 +12,7 @@
|
||||
using namespace mozilla::dom;
|
||||
|
||||
#define BUFFER_SIZE 4096
|
||||
#define COMMAND_SIZE 256
|
||||
#define PROPERTY_VALUE_MAX 80
|
||||
|
||||
// Intentionally not trying to dlclose() this handle. That's playing
|
||||
@ -237,6 +238,20 @@ public:
|
||||
USE_DLFUNC(wifi_stop_supplicant)
|
||||
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.
|
||||
|
@ -143,9 +143,14 @@ SourceSurfaceD2DTarget::GetBitmap(ID2D1RenderTarget *aRT)
|
||||
|
||||
if (FAILED(hr)) {
|
||||
// This seems to happen for SurfaceFormat::A8 sometimes...
|
||||
aRT->CreateBitmap(D2D1::SizeU(desc.Width, desc.Height),
|
||||
D2D1::BitmapProperties(D2DPixelFormat(mFormat)),
|
||||
byRef(mBitmap));
|
||||
hr = aRT->CreateBitmap(D2D1::SizeU(desc.Width, desc.Height),
|
||||
D2D1::BitmapProperties(D2DPixelFormat(mFormat)),
|
||||
byRef(mBitmap));
|
||||
|
||||
if (FAILED(hr)) {
|
||||
gfxWarning() << "Failed in CreateBitmap. Code: " << hr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<ID2D1RenderTarget> rt;
|
||||
|
||||
|
@ -685,8 +685,8 @@ CompositorD3D11::BeginFrame(const nsIntRegion& aInvalidRegion,
|
||||
|
||||
UpdateRenderTarget();
|
||||
|
||||
// Failed to create a render target.
|
||||
if (!mDefaultRT ||
|
||||
// Failed to create a render target or the view.
|
||||
if (!mDefaultRT || !mDefaultRT->mRTView ||
|
||||
mSize.width == 0 || mSize.height == 0) {
|
||||
*aRenderBoundsOut = Rect();
|
||||
return;
|
||||
|
@ -83,6 +83,8 @@
|
||||
android:debuggable="true">
|
||||
#endif
|
||||
|
||||
<!-- If the windowSoftInputMode adjust* flag changes below, the
|
||||
setSoftInputMode call in BrowserSearch#onStop must also be updated. -->
|
||||
<activity android:name=".App"
|
||||
android:label="@MOZ_APP_DISPLAYNAME@"
|
||||
android:configChanges="keyboard|keyboardHidden|mcc|mnc|orientation|screenSize"
|
||||
|
@ -42,6 +42,7 @@ import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewStub;
|
||||
import android.view.WindowManager;
|
||||
import android.view.WindowManager.LayoutParams;
|
||||
import android.view.animation.AccelerateInterpolator;
|
||||
import android.view.animation.Animation;
|
||||
@ -53,7 +54,6 @@ import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 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
|
||||
private SuggestionLoaderCallbacks mSuggestionLoaderCallbacks;
|
||||
|
||||
// Inflater used by the adapter
|
||||
private LayoutInflater mInflater;
|
||||
|
||||
// Autocomplete handler used when filtering results
|
||||
private AutocompleteHandler mAutocompleteHandler;
|
||||
|
||||
@ -177,15 +174,12 @@ public class BrowserSearch extends HomeFragment
|
||||
throw new ClassCastException(activity.toString()
|
||||
+ " must implement BrowserSearch.OnEditSuggestionListener");
|
||||
}
|
||||
|
||||
mInflater = (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
|
||||
mInflater = null;
|
||||
mAutocompleteHandler = null;
|
||||
mUrlOpenListener = null;
|
||||
mSearchListener = null;
|
||||
@ -206,6 +200,23 @@ public class BrowserSearch extends HomeFragment
|
||||
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
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
// 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 java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -51,7 +50,7 @@ public class PanelManager implements GeckoEventListener {
|
||||
private static AtomicInteger sRequestId = new AtomicInteger(0);
|
||||
|
||||
// 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.
|
||||
|
@ -133,8 +133,7 @@ panel[type="arrow"][side="right"] {
|
||||
@media (-moz-windows-default-theme) {
|
||||
.panel-arrowcontent {
|
||||
border-color: hsla(210,4%,10%,.2);
|
||||
box-shadow: 0 3px 5px hsla(210,4%,10%,.1),
|
||||
0 0 7px hsla(210,4%,10%,.1);
|
||||
box-shadow: 0 0 4px hsla(210,4%,10%,.2);
|
||||
}
|
||||
|
||||
.panel-arrow[side="top"],
|
||||
|
Loading…
Reference in New Issue
Block a user