mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Merge mozilla-central to inbound. a=merge CLOSED TREE
This commit is contained in:
commit
acef52f8d3
@ -69,7 +69,28 @@ let whitelist = [
|
||||
intermittent: true,
|
||||
errorMessage: /Property contained reference to invalid variable.*color/i,
|
||||
isFromDevTools: true},
|
||||
];
|
||||
|
||||
if (!Services.prefs.getBoolPref("full-screen-api.unprefix.enabled")) {
|
||||
whitelist.push({
|
||||
sourceName: /(?:res|gre-resources)\/(ua|html)\.css$/i,
|
||||
errorMessage: /Unknown pseudo-class .*\bfullscreen\b/i,
|
||||
isFromDevTools: false
|
||||
});
|
||||
}
|
||||
|
||||
// Platform can be "linux", "macosx" or "win". If omitted, the exception applies to all platforms.
|
||||
let allowedImageReferences = [
|
||||
// Bug 1302691
|
||||
{file: "chrome://devtools/skin/images/dock-bottom-minimize@2x.png",
|
||||
from: "chrome://devtools/skin/toolbox.css",
|
||||
isFromDevTools: true},
|
||||
{file: "chrome://devtools/skin/images/dock-bottom-maximize@2x.png",
|
||||
from: "chrome://devtools/skin/toolbox.css",
|
||||
isFromDevTools: true},
|
||||
];
|
||||
|
||||
let propNameWhitelist = [
|
||||
// These are CSS custom properties that we found a definition of but
|
||||
// no reference to.
|
||||
// Bug 1441837
|
||||
@ -131,30 +152,17 @@ let whitelist = [
|
||||
isFromDevTools: true},
|
||||
];
|
||||
|
||||
if (!Services.prefs.getBoolPref("full-screen-api.unprefix.enabled")) {
|
||||
whitelist.push({
|
||||
sourceName: /(?:res|gre-resources)\/(ua|html)\.css$/i,
|
||||
errorMessage: /Unknown pseudo-class .*\bfullscreen\b/i,
|
||||
isFromDevTools: false
|
||||
});
|
||||
}
|
||||
|
||||
// Platform can be "linux", "macosx" or "win". If omitted, the exception applies to all platforms.
|
||||
let allowedImageReferences = [
|
||||
// Bug 1302691
|
||||
{file: "chrome://devtools/skin/images/dock-bottom-minimize@2x.png",
|
||||
from: "chrome://devtools/skin/toolbox.css",
|
||||
isFromDevTools: true},
|
||||
{file: "chrome://devtools/skin/images/dock-bottom-maximize@2x.png",
|
||||
from: "chrome://devtools/skin/toolbox.css",
|
||||
isFromDevTools: true},
|
||||
];
|
||||
|
||||
// Add suffix to stylesheets' URI so that we always load them here and
|
||||
// have them parsed. Add a random number so that even if we run this
|
||||
// test multiple times, it would be unlikely to affect each other.
|
||||
const kPathSuffix = "?always-parse-css-" + Math.random();
|
||||
|
||||
function dumpWhitelistItem(item) {
|
||||
return JSON.stringify(item, (key, value) => {
|
||||
return value instanceof RegExp ? value.toString() : value;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an error should be ignored due to matching one of the whitelist
|
||||
* objects defined in whitelist
|
||||
@ -165,15 +173,26 @@ const kPathSuffix = "?always-parse-css-" + Math.random();
|
||||
function ignoredError(aErrorObject) {
|
||||
for (let whitelistItem of whitelist) {
|
||||
let matches = true;
|
||||
let catchAll = true;
|
||||
for (let prop of ["sourceName", "errorMessage"]) {
|
||||
if (whitelistItem.hasOwnProperty(prop) &&
|
||||
!whitelistItem[prop].test(aErrorObject[prop] || "")) {
|
||||
matches = false;
|
||||
break;
|
||||
if (whitelistItem.hasOwnProperty(prop)) {
|
||||
catchAll = false;
|
||||
if (!whitelistItem[prop].test(aErrorObject[prop] || "")) {
|
||||
matches = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (catchAll) {
|
||||
ok(false, "A whitelist item is catching all errors. " +
|
||||
dumpWhitelistItem(whitelistItem));
|
||||
continue;
|
||||
}
|
||||
if (matches) {
|
||||
whitelistItem.used = true;
|
||||
let {sourceName, errorMessage} = aErrorObject;
|
||||
info(`Ignored error "${errorMessage}" on ${sourceName} ` +
|
||||
"because of whitelist item " + dumpWhitelistItem(whitelistItem));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -248,7 +267,6 @@ function messageIsCSSError(msg) {
|
||||
ok(false, `Got error message for ${sourceName}: ${msg.errorMessage}`);
|
||||
return true;
|
||||
}
|
||||
info(`Ignored error for ${sourceName} because of filter.`);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -430,7 +448,7 @@ add_task(async function checkAllTheCSS() {
|
||||
for (let [prop, refCount] of customPropsToReferencesMap) {
|
||||
if (!refCount) {
|
||||
let ignored = false;
|
||||
for (let item of whitelist) {
|
||||
for (let item of propNameWhitelist) {
|
||||
if (item.propName == prop &&
|
||||
isDevtools == item.isFromDevTools) {
|
||||
item.used = true;
|
||||
@ -453,27 +471,18 @@ add_task(async function checkAllTheCSS() {
|
||||
is(errors.length, 0, "All the styles (" + allPromises.length + ") loaded without errors.");
|
||||
|
||||
// Confirm that all whitelist rules have been used.
|
||||
for (let item of whitelist) {
|
||||
if (!item.used &&
|
||||
(!item.platforms || item.platforms.includes(AppConstants.platform)) &&
|
||||
isDevtools == item.isFromDevTools &&
|
||||
!item.intermittent) {
|
||||
ok(false, "Unused whitelist item. " +
|
||||
(item.propName ? " propName: " + item.propName : "") +
|
||||
(item.sourceName ? " sourceName: " + item.sourceName : "") +
|
||||
(item.errorMessage ? " errorMessage: " + item.errorMessage : ""));
|
||||
}
|
||||
}
|
||||
|
||||
// Confirm that all file whitelist rules have been used.
|
||||
for (let item of allowedImageReferences) {
|
||||
if (!item.used && isDevtools == item.isFromDevTools &&
|
||||
(!item.platforms || item.platforms.includes(AppConstants.platform))) {
|
||||
ok(false, "Unused file whitelist item. " +
|
||||
" file: " + item.file +
|
||||
" from: " + item.from);
|
||||
function checkWhitelist(list) {
|
||||
for (let item of list) {
|
||||
if (!item.used && isDevtools == item.isFromDevTools &&
|
||||
(!item.platforms || item.platforms.includes(AppConstants.platform)) &&
|
||||
!item.intermittent) {
|
||||
ok(false, "Unused whitelist item: " + dumpWhitelistItem(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
checkWhitelist(whitelist);
|
||||
checkWhitelist(allowedImageReferences);
|
||||
checkWhitelist(propNameWhitelist);
|
||||
|
||||
// Clean up to avoid leaks:
|
||||
iframe.remove();
|
||||
|
@ -140,6 +140,14 @@ var Policies = {
|
||||
}
|
||||
},
|
||||
|
||||
"DisableFirefoxAccounts": {
|
||||
onBeforeAddons(manager, param) {
|
||||
if (param) {
|
||||
setAndLockPref("identity.fxaccounts.enabled", false);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"DisableFirefoxScreenshots": {
|
||||
onBeforeAddons(manager, param) {
|
||||
if (param) {
|
||||
@ -182,7 +190,6 @@ var Policies = {
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"DisplayBookmarksToolbar": {
|
||||
onBeforeUIStartup(manager, param) {
|
||||
if (param) {
|
||||
|
@ -115,6 +115,13 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
"DisableFirefoxAccounts": {
|
||||
"description": "Disables Firefox Account based services, including Sync.",
|
||||
"first_available": "60.0",
|
||||
|
||||
"type": "boolean"
|
||||
},
|
||||
|
||||
"DisableFirefoxScreenshots": {
|
||||
"description": "Prevents usage of the Firefox Screenshots feature.",
|
||||
"first_available": "60.0",
|
||||
|
@ -22,6 +22,7 @@ support-files =
|
||||
[browser_policy_bookmarks.js]
|
||||
[browser_policy_default_browser_check.js]
|
||||
[browser_policy_disable_formhistory.js]
|
||||
[browser_policy_disable_fxaccounts.js]
|
||||
[browser_policy_disable_fxscreenshots.js]
|
||||
[browser_policy_disable_masterpassword.js]
|
||||
[browser_policy_disable_pocket.js]
|
||||
|
@ -0,0 +1,23 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
add_task(async function test_policy_disable_fxaccounts() {
|
||||
is(gSync.SYNC_ENABLED, true, "Sync is enabled before setting the policy.");
|
||||
|
||||
await setupPolicyEngineWithJson({
|
||||
"policies": {
|
||||
"DisableFirefoxAccounts": true
|
||||
}
|
||||
});
|
||||
|
||||
is(gSync.SYNC_ENABLED, false, "Sync is disabled after setting the policy.");
|
||||
|
||||
// Manually clean-up the change made by the policy engine.
|
||||
// This is needed in case this test runs twice in a row
|
||||
// (such as in test-verify), in order for the first check
|
||||
// to pass again.
|
||||
Services.prefs.unlockPref("identity.fxaccounts.enabled");
|
||||
Services.prefs.getDefaultBranch("").setBoolPref("identity.fxaccounts.enabled", true);
|
||||
});
|
@ -69,6 +69,7 @@ private:
|
||||
nsresult SetFilePath(const nsACString &input);
|
||||
nsresult SetQuery(const nsACString &input);
|
||||
nsresult SetQueryWithEncoding(const nsACString &input, const mozilla::Encoding* encoding);
|
||||
bool Deserialize(const mozilla::ipc::URIParams&);
|
||||
|
||||
public:
|
||||
class Mutator final
|
||||
|
@ -178,6 +178,7 @@ skip-if = true # Bug 1437843
|
||||
[browser_console_nsiconsolemessage.js]
|
||||
[browser_console_open_or_focus.js]
|
||||
[browser_console_restore.js]
|
||||
[browser_console_webconsole_console_api_calls.js]
|
||||
[browser_console_webconsole_ctrlw_close_tab.js]
|
||||
[browser_console_webconsole_iframe_messages.js]
|
||||
[browser_console_webconsole_private_browsing.js]
|
||||
|
@ -0,0 +1,55 @@
|
||||
/* 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/. */
|
||||
|
||||
// Test that console API calls in the content page appear in the browser console.
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
const TEST_URI = `data:text/html,<meta charset=utf8>console API calls`
|
||||
|
||||
add_task(async function() {
|
||||
await addTab(TEST_URI);
|
||||
const hud = await HUDService.toggleBrowserConsole();
|
||||
|
||||
const contentArgs = {
|
||||
log: "MyLog",
|
||||
warn: "MyWarn",
|
||||
error: "MyError",
|
||||
info: "MyInfo",
|
||||
debug: "MyDebug",
|
||||
counterName: "MyCounter",
|
||||
timerName: "MyTimer",
|
||||
};
|
||||
|
||||
const expectedMessages = [
|
||||
contentArgs.log,
|
||||
contentArgs.warn,
|
||||
contentArgs.error,
|
||||
contentArgs.info,
|
||||
contentArgs.debug,
|
||||
`${contentArgs.counterName}: 1`,
|
||||
`${contentArgs.timerName}:`,
|
||||
`console.trace`,
|
||||
`Assertion failed`,
|
||||
];
|
||||
const onAllMessages = Promise.all(expectedMessages.map(m => waitForMessage(hud, m)));
|
||||
|
||||
ContentTask.spawn(gBrowser.selectedBrowser, contentArgs, function (args) {
|
||||
content.console.log(args.log);
|
||||
content.console.warn(args.warn);
|
||||
content.console.error(args.error);
|
||||
content.console.info(args.info);
|
||||
content.console.debug(args.debug);
|
||||
content.console.count(args.counterName);
|
||||
content.console.time(args.timerName);
|
||||
content.console.timeEnd(args.timerName);
|
||||
content.console.trace();
|
||||
content.console.assert(false, "err");
|
||||
});
|
||||
|
||||
await onAllMessages;
|
||||
|
||||
ok(true, "Expected messages are displayed in the browser console");
|
||||
});
|
@ -55,14 +55,13 @@ ContentProcessForward.prototype = {
|
||||
let consoleMsg = subject.wrappedJSObject;
|
||||
|
||||
let msgData = {
|
||||
level: consoleMsg.level,
|
||||
...consoleMsg,
|
||||
arguments: [],
|
||||
filename: consoleMsg.filename.substring(0, MSG_MGR_CONSOLE_INFO_MAX),
|
||||
lineNumber: consoleMsg.lineNumber,
|
||||
functionName: consoleMsg.functionName &&
|
||||
consoleMsg.functionName.substring(0, MSG_MGR_CONSOLE_INFO_MAX),
|
||||
timeStamp: consoleMsg.timeStamp,
|
||||
addonId: consoleMsg.addonId,
|
||||
arguments: [],
|
||||
// Prevents cyclic object error when using msgData in sendAsyncMessage
|
||||
wrappedJSObject: null,
|
||||
};
|
||||
|
||||
// We can't send objects over the message manager, so we sanitize
|
||||
|
@ -1437,6 +1437,29 @@ waitForAllPaints(() => {
|
||||
await ensureElementRemoval(div);
|
||||
});
|
||||
|
||||
add_task(async function no_throttling_animations_in_transformed_parent() {
|
||||
var div = addDiv(null, { style: 'overflow: scroll;' +
|
||||
'transform: translateX(50px);' });
|
||||
var svg = addSVGElement(div, 'svg', { viewBox: '0 0 1250 1250',
|
||||
width: '40px',
|
||||
height: '40px' });
|
||||
var rect = addSVGElement(svg, 'rect', { x: '0',
|
||||
y: '0',
|
||||
width: '1250',
|
||||
height: '1250',
|
||||
fill: 'red' });
|
||||
var animation = rect.animate({ fill: ['blue', 'lime'] }, 100 * MS_PER_SEC);
|
||||
await animation.ready;
|
||||
|
||||
const expectedRestyleCount = tweakExpectedRestyleCount(animation, 5);
|
||||
var markers = await observeStyling(5);
|
||||
is(markers.length, expectedRestyleCount,
|
||||
'CSS animations on an in-view svg element which is inside transformed ' +
|
||||
'parent should not be throttled.');
|
||||
|
||||
await ensureElementRemoval(div);
|
||||
});
|
||||
|
||||
add_task(async function throttling_animations_out_of_view_svg() {
|
||||
var div = addDiv(null, { style: 'overflow: scroll;' +
|
||||
'height: 100px; width: 100px;' });
|
||||
|
@ -77,6 +77,7 @@ protected:
|
||||
virtual ~nsHostObjectURI() {}
|
||||
|
||||
nsresult SetScheme(const nsACString &aProtocol) override;
|
||||
bool Deserialize(const mozilla::ipc::URIParams&);
|
||||
|
||||
public:
|
||||
class Mutator final
|
||||
|
@ -102,6 +102,8 @@ protected:
|
||||
virtual nsresult EqualsInternal(nsIURI* other,
|
||||
RefHandlingEnum refHandlingMode,
|
||||
bool* result) override;
|
||||
bool Deserialize(const mozilla::ipc::URIParams&);
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIURI> mBaseURI;
|
||||
|
||||
|
@ -16,24 +16,22 @@ XPIDL_MODULE = 'composer'
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'ComposerCommandsUpdater.cpp',
|
||||
'EditorSpellCheck.cpp',
|
||||
'nsComposerCommands.cpp',
|
||||
'nsComposerController.cpp',
|
||||
'nsComposerDocumentCommands.cpp',
|
||||
'nsComposerRegistration.cpp',
|
||||
'nsComposeTxtSrvFilter.cpp',
|
||||
'nsEditingSession.cpp',
|
||||
]
|
||||
|
||||
EXPORTS.mozilla += [
|
||||
'ComposerCommandsUpdater.h',
|
||||
'EditorSpellCheck.h',
|
||||
]
|
||||
|
||||
# Needed because we include HTMLEditor.h which indirectly includes nsDocument.h
|
||||
LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
'/dom/html', # For nsHTMLDocument
|
||||
'/editor/spellchecker', # nsComposeTxtSrvFilter.h
|
||||
'/layout/style', # For things nsHTMLDocument includes.
|
||||
]
|
||||
|
||||
|
@ -1,42 +1,8 @@
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
bug678842_subframe.html
|
||||
bug717433_subframe.html
|
||||
bug1200533_subframe.html
|
||||
bug1204147_subframe.html
|
||||
bug1204147_subframe2.html
|
||||
en-GB/en_GB.dic
|
||||
en-GB/en_GB.aff
|
||||
en-AU/en_AU.dic
|
||||
en-AU/en_AU.aff
|
||||
de-DE/de_DE.dic
|
||||
de-DE/de_DE.aff
|
||||
|
||||
[test_async_UpdateCurrentDictionary.html]
|
||||
skip-if = os == 'android'
|
||||
[test_bug338427.html]
|
||||
skip-if = os == 'android'
|
||||
[test_bug348497.html]
|
||||
[test_bug384147.html]
|
||||
[test_bug389350.html]
|
||||
skip-if = toolkit == 'android'
|
||||
[test_bug519928.html]
|
||||
[test_bug678842.html]
|
||||
skip-if = os == 'android'
|
||||
[test_bug697981.html]
|
||||
skip-if = os == 'android'
|
||||
[test_bug717433.html]
|
||||
skip-if = os == 'android'
|
||||
[test_bug738440.html]
|
||||
[test_bug1200533.html]
|
||||
skip-if = os == 'android'
|
||||
[test_bug1204147.html]
|
||||
skip-if = os == 'android'
|
||||
[test_bug1205983.html]
|
||||
skip-if = os == 'android'
|
||||
[test_bug1209414.html]
|
||||
skip-if = os == 'android'
|
||||
[test_bug1219928.html]
|
||||
skip-if = e10s || os == 'android'
|
||||
[test_bug1365383.html]
|
||||
skip-if = os == 'android'
|
||||
|
@ -5,8 +5,8 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DIRS += [
|
||||
'txtsvc',
|
||||
'libeditor',
|
||||
'spellchecker',
|
||||
'txmgr',
|
||||
'composer',
|
||||
]
|
||||
|
@ -4,6 +4,8 @@
|
||||
# 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/.
|
||||
|
||||
MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIInlineSpellChecker.idl',
|
||||
'nsITextServicesFilter.idl',
|
||||
@ -16,10 +18,13 @@ EXPORTS += [
|
||||
]
|
||||
|
||||
EXPORTS.mozilla += [
|
||||
'EditorSpellCheck.h',
|
||||
'TextServicesDocument.h',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'EditorSpellCheck.cpp',
|
||||
'nsComposeTxtSrvFilter.cpp',
|
||||
'nsFilteredContentIterator.cpp',
|
||||
'TextServicesDocument.cpp',
|
||||
]
|
26
editor/spellchecker/tests/mochitest.ini
Normal file
26
editor/spellchecker/tests/mochitest.ini
Normal file
@ -0,0 +1,26 @@
|
||||
[DEFAULT]
|
||||
skip-if = os == 'android'
|
||||
support-files =
|
||||
bug678842_subframe.html
|
||||
bug717433_subframe.html
|
||||
bug1200533_subframe.html
|
||||
bug1204147_subframe.html
|
||||
bug1204147_subframe2.html
|
||||
en-GB/en_GB.dic
|
||||
en-GB/en_GB.aff
|
||||
en-AU/en_AU.dic
|
||||
en-AU/en_AU.aff
|
||||
de-DE/de_DE.dic
|
||||
de-DE/de_DE.aff
|
||||
|
||||
[test_async_UpdateCurrentDictionary.html]
|
||||
[test_bug678842.html]
|
||||
[test_bug697981.html]
|
||||
[test_bug717433.html]
|
||||
[test_bug1200533.html]
|
||||
[test_bug1204147.html]
|
||||
[test_bug1205983.html]
|
||||
[test_bug1209414.html]
|
||||
[test_bug1219928.html]
|
||||
skip-if = e10s
|
||||
[test_bug1365383.html]
|
@ -58,8 +58,8 @@ var loadListener = function(evt) {
|
||||
.get("CurWorkD", Ci.nsIFile);
|
||||
dir.append("tests");
|
||||
dir.append("editor");
|
||||
dir.append("composer");
|
||||
dir.append("test");
|
||||
dir.append("spellchecker");
|
||||
dir.append("tests");
|
||||
|
||||
var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(Ci.mozISpellCheckingEngine);
|
||||
@ -119,7 +119,7 @@ function continueTest(evt) {
|
||||
loadCount++;
|
||||
if (loadCount < tests.length) {
|
||||
// Load the iframe again.
|
||||
content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug1200533_subframe.html?firstload=false';
|
||||
content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1200533_subframe.html?firstload=false';
|
||||
} else {
|
||||
// Remove the fake dictionaries again, since it's otherwise picked up by later tests.
|
||||
script.sendSyncMessage("destroy");
|
||||
@ -132,7 +132,7 @@ function continueTest(evt) {
|
||||
|
||||
content.addEventListener('load', loadListener);
|
||||
|
||||
content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug1200533_subframe.html?firstload=true';
|
||||
content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1200533_subframe.html?firstload=true';
|
||||
|
||||
</script>
|
||||
</pre>
|
@ -37,8 +37,8 @@ var loadListener = function(evt) {
|
||||
.get("CurWorkD", Ci.nsIFile);
|
||||
dir.append("tests");
|
||||
dir.append("editor");
|
||||
dir.append("composer");
|
||||
dir.append("test");
|
||||
dir.append("spellchecker");
|
||||
dir.append("tests");
|
||||
|
||||
var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(Ci.mozISpellCheckingEngine);
|
||||
@ -87,7 +87,7 @@ var loadListener = function(evt) {
|
||||
// because the trouble-maker causes the 'global' spell check dictionary to be set to "en-GB"
|
||||
// (since it picks the first one from the list) before we have the chance to retrieve
|
||||
// the dictionary for the element (which happens asynchonously after the spell check has completed).
|
||||
content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug1204147_subframe2.html?firstload=false';
|
||||
content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1204147_subframe2.html?firstload=false';
|
||||
} else {
|
||||
// Second time around, the element should default to en-US.
|
||||
// Without the fix, the first run sets the content preference to en-GB for the whole site.
|
||||
@ -105,7 +105,7 @@ var loadListener = function(evt) {
|
||||
|
||||
content.addEventListener('load', loadListener);
|
||||
|
||||
content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug1204147_subframe.html?firstload=true';
|
||||
content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug1204147_subframe.html?firstload=true';
|
||||
|
||||
</script>
|
||||
</pre>
|
@ -41,8 +41,8 @@ SimpleTest.waitForFocus(function() {
|
||||
.get("CurWorkD", Ci.nsIFile);
|
||||
dir.append("tests");
|
||||
dir.append("editor");
|
||||
dir.append("composer");
|
||||
dir.append("test");
|
||||
dir.append("spellchecker");
|
||||
dir.append("tests");
|
||||
|
||||
var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(Ci.mozISpellCheckingEngine);
|
@ -60,8 +60,8 @@ SimpleTest.waitForFocus(function() {
|
||||
.get("CurWorkD", Ci.nsIFile);
|
||||
dir.append("tests");
|
||||
dir.append("editor");
|
||||
dir.append("composer");
|
||||
dir.append("test");
|
||||
dir.append("spellchecker");
|
||||
dir.append("tests");
|
||||
|
||||
var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(Ci.mozISpellCheckingEngine);
|
@ -36,8 +36,8 @@ var loadListener = function(evt) {
|
||||
.get("CurWorkD", Ci.nsIFile);
|
||||
dir.append("tests");
|
||||
dir.append("editor");
|
||||
dir.append("composer");
|
||||
dir.append("test");
|
||||
dir.append("spellchecker");
|
||||
dir.append("tests");
|
||||
|
||||
var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(Ci.mozISpellCheckingEngine);
|
||||
@ -81,7 +81,7 @@ var loadListener = function(evt) {
|
||||
// Select en-GB.
|
||||
spellchecker.SetCurrentDictionary("en-GB");
|
||||
|
||||
content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug678842_subframe.html?firstload=false';
|
||||
content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug678842_subframe.html?firstload=false';
|
||||
} else {
|
||||
is (currentDictonary, "en-GB", "unexpected lang " + currentDictonary + " instead of en-GB");
|
||||
content.removeEventListener('load', loadListener);
|
||||
@ -98,7 +98,7 @@ var loadListener = function(evt) {
|
||||
|
||||
content.addEventListener('load', loadListener);
|
||||
|
||||
content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug678842_subframe.html?firstload=true';
|
||||
content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug678842_subframe.html?firstload=true';
|
||||
|
||||
</script>
|
||||
</pre>
|
@ -41,8 +41,8 @@ SimpleTest.waitForFocus(function() {
|
||||
.get("CurWorkD", Ci.nsIFile);
|
||||
dir.append("tests");
|
||||
dir.append("editor");
|
||||
dir.append("composer");
|
||||
dir.append("test");
|
||||
dir.append("spellchecker");
|
||||
dir.append("tests");
|
||||
|
||||
var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(Ci.mozISpellCheckingEngine);
|
@ -38,8 +38,8 @@ var loadListener = function(evt) {
|
||||
.get("CurWorkD", Ci.nsIFile);
|
||||
dir.append("tests");
|
||||
dir.append("editor");
|
||||
dir.append("composer");
|
||||
dir.append("test");
|
||||
dir.append("spellchecker");
|
||||
dir.append("tests");
|
||||
|
||||
var hunspell = Cc["@mozilla.org/spellchecker/engine;1"]
|
||||
.getService(Ci.mozISpellCheckingEngine);
|
||||
@ -83,7 +83,7 @@ var loadListener = function(evt) {
|
||||
} else {
|
||||
is(true, false, "Neither en-US nor en-GB are current");
|
||||
}
|
||||
content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug717433_subframe.html?firstload=false';
|
||||
content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug717433_subframe.html?firstload=false';
|
||||
} else {
|
||||
is(currentDictonary, expected, expected + " expected");
|
||||
content.removeEventListener('load', loadListener);
|
||||
@ -100,7 +100,7 @@ var loadListener = function(evt) {
|
||||
|
||||
content.addEventListener('load', loadListener);
|
||||
|
||||
content.src = 'http://mochi.test:8888/tests/editor/composer/test/bug717433_subframe.html?firstload=true';
|
||||
content.src = 'http://mochi.test:8888/tests/editor/spellchecker/tests/bug717433_subframe.html?firstload=true';
|
||||
|
||||
</script>
|
||||
</pre>
|
@ -62,6 +62,7 @@ private:
|
||||
nsresult SetFilePath(const nsACString &input);
|
||||
nsresult SetQuery(const nsACString &input);
|
||||
nsresult SetQueryWithEncoding(const nsACString &input, const mozilla::Encoding* encoding);
|
||||
bool Deserialize(const mozilla::ipc::URIParams&);
|
||||
|
||||
public:
|
||||
class Mutator final
|
||||
|
@ -27,8 +27,7 @@ public:
|
||||
virtual void
|
||||
Serialize(mozilla::ipc::URIParams& aParams) = 0;
|
||||
|
||||
virtual bool
|
||||
Deserialize(const mozilla::ipc::URIParams& aParams) = 0;
|
||||
// For deserialization, see nsIURIMutator
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsIIPCSerializableURI,
|
||||
@ -36,24 +35,16 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIIPCSerializableURI,
|
||||
|
||||
#define NS_DECL_NSIIPCSERIALIZABLEURI \
|
||||
virtual void \
|
||||
Serialize(mozilla::ipc::URIParams&) override; \
|
||||
virtual bool \
|
||||
Deserialize(const mozilla::ipc::URIParams&) override;
|
||||
Serialize(mozilla::ipc::URIParams&) override;
|
||||
|
||||
#define NS_FORWARD_NSIIPCSERIALIZABLEURI(_to) \
|
||||
virtual void \
|
||||
Serialize(mozilla::ipc::URIParams& aParams) override \
|
||||
{ _to Serialize(aParams); } \
|
||||
virtual bool \
|
||||
Deserialize(const mozilla::ipc::URIParams& aParams) override \
|
||||
{ return _to Deserialize(aParams); }
|
||||
{ _to Serialize(aParams); }
|
||||
|
||||
#define NS_FORWARD_SAFE_NSIIPCSERIALIZABLEURI(_to) \
|
||||
virtual void \
|
||||
Serialize(mozilla::ipc::URIParams& aParams) override \
|
||||
{ if (_to) { _to->Serialize(aParams); } } \
|
||||
virtual bool \
|
||||
Deserialize(const mozilla::ipc::URIParams& aParams) override \
|
||||
{ if (_to) { return _to->Deserialize(aParams); } return false; }
|
||||
{ if (_to) { _to->Serialize(aParams); } }
|
||||
|
||||
#endif // mozilla_ipc_nsIIPCSerializableURI_h
|
||||
|
@ -11068,7 +11068,8 @@ IsFrameScrolledOutOfView(nsIFrame* aTarget,
|
||||
aTargetRect,
|
||||
scrollableParent);
|
||||
|
||||
nsRect scrollableRect = scrollableParent->GetVisualOverflowRect();
|
||||
nsRect scrollableRect =
|
||||
scrollableParent->GetVisualOverflowRectRelativeToSelf();
|
||||
if (transformedRect.IsEmpty()) {
|
||||
// If the transformed rect is empty it represents a line or a point that we
|
||||
// should check is outside the the scrollable rect.
|
||||
|
@ -113,6 +113,7 @@ private:
|
||||
nsresult SetFilePath(const nsACString &input);
|
||||
nsresult SetQuery(const nsACString &input);
|
||||
nsresult SetQueryWithEncoding(const nsACString &input, const Encoding* encoding);
|
||||
bool Deserialize(const mozilla::ipc::URIParams&);
|
||||
|
||||
nsresult SetFileNameInternal(const nsACString& fileName);
|
||||
nsresult SetFileBaseNameInternal(const nsACString& fileBaseName);
|
||||
|
@ -70,6 +70,7 @@ public:
|
||||
protected:
|
||||
nsCOMPtr<nsIURI> mInnerURI;
|
||||
|
||||
bool Deserialize(const mozilla::ipc::URIParams&);
|
||||
|
||||
public:
|
||||
class Mutator final
|
||||
|
@ -117,6 +117,8 @@ protected:
|
||||
|
||||
nsresult SetPathQueryRefEscaped(const nsACString &aPath, bool aNeedsEscape);
|
||||
|
||||
bool Deserialize(const mozilla::ipc::URIParams&);
|
||||
|
||||
nsCString mScheme;
|
||||
nsCString mPath; // NOTE: mPath does not include ref, as an optimization
|
||||
nsCString mRef; // so that URIs with different refs can share string data.
|
||||
|
@ -193,6 +193,7 @@ protected:
|
||||
virtual nsresult SetFilePath(const nsACString &input);
|
||||
virtual nsresult SetQuery(const nsACString &input);
|
||||
virtual nsresult SetQueryWithEncoding(const nsACString &input, const Encoding* encoding);
|
||||
bool Deserialize(const mozilla::ipc::URIParams&);
|
||||
|
||||
private:
|
||||
nsresult Init(uint32_t urlType, int32_t defaultPort, const nsACString &spec,
|
||||
|
Loading…
Reference in New Issue
Block a user