зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e50cbce87f8d (bug 1618539) for nsFocusManager related crashes CLOSED TREE
This commit is contained in:
Родитель
f92d37e44f
Коммит
69ff22a78e
|
@ -76,6 +76,14 @@ async function testURL(url, loadFunc, endFunc) {
|
|||
null,
|
||||
"focusedElement not null"
|
||||
);
|
||||
|
||||
if (arg.isRemote) {
|
||||
Assert.equal(
|
||||
Services.focus.activeWindow,
|
||||
content,
|
||||
"activeWindow not correct"
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -359,8 +359,7 @@ InputContextAction::Cause nsFocusManager::GetFocusMoveActionCause(
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsFocusManager::GetActiveWindow(mozIDOMWindowProxy** aWindow) {
|
||||
MOZ_ASSERT(XRE_IsParentProcess(),
|
||||
"Must not be called outside the parent process.");
|
||||
// TODO mActiveWindow in content process
|
||||
NS_IF_ADDREF(*aWindow = mActiveWindow);
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,8 @@ var test = function(isContent) {
|
|||
set: [["security.allow_eval_with_system_principal", true]],
|
||||
});
|
||||
|
||||
if (!isContent) {
|
||||
let { ww } = SpecialPowers.Services;
|
||||
window.chromeWindow = ww.activeWindow;
|
||||
}
|
||||
let { ww } = SpecialPowers.Services;
|
||||
window.chromeWindow = ww.activeWindow;
|
||||
|
||||
// The pairs of values expected to be the same when
|
||||
// fingerprinting resistance is enabled.
|
||||
|
@ -64,11 +62,11 @@ var test = function(isContent) {
|
|||
pairs.map(function([item, onVal]) {
|
||||
if (resisting) {
|
||||
checkPair("window." + item, onVal);
|
||||
} else if (!isContent && !item.startsWith("moz")) {
|
||||
} else if (!item.startsWith("moz")) {
|
||||
checkPair("window." + item, "chromeWindow." + item);
|
||||
}
|
||||
});
|
||||
if (!isContent && !resisting) {
|
||||
if (!resisting) {
|
||||
// Hard to predict these values, but we can enforce constraints:
|
||||
ok(
|
||||
window.mozInnerScreenX >= chromeWindow.mozInnerScreenX,
|
||||
|
|
|
@ -45,7 +45,7 @@ interface nsIFocusManager : nsISupports
|
|||
{
|
||||
/**
|
||||
* The most active (frontmost) window, or null if no window that is part of
|
||||
* the application is active. Do not use outside the parent process.
|
||||
* the application is active.
|
||||
*/
|
||||
readonly attribute mozIDOMWindowProxy activeWindow;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче