mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
c416859636
20 changed files with 24 additions and 70 deletions
|
|
@ -32,16 +32,14 @@ PostMessageEvent::PostMessageEvent(nsGlobalWindow* aSource,
|
|||
const nsAString& aCallerOrigin,
|
||||
nsGlobalWindow* aTargetWindow,
|
||||
nsIPrincipal* aProvidedPrincipal,
|
||||
nsIDocument* aSourceDocument,
|
||||
bool aTrustedCaller)
|
||||
: StructuredCloneHolder(CloningSupported, TransferringSupported,
|
||||
StructuredCloneScope::SameProcessSameThread),
|
||||
mSource(aSource),
|
||||
mCallerOrigin(aCallerOrigin),
|
||||
mTargetWindow(aTargetWindow),
|
||||
mProvidedPrincipal(aProvidedPrincipal),
|
||||
mSourceDocument(aSourceDocument),
|
||||
mTrustedCaller(aTrustedCaller)
|
||||
nsIDocument* aSourceDocument)
|
||||
: StructuredCloneHolder(CloningSupported, TransferringSupported,
|
||||
StructuredCloneScope::SameProcessSameThread)
|
||||
, mSource(aSource)
|
||||
, mCallerOrigin(aCallerOrigin)
|
||||
, mTargetWindow(aTargetWindow)
|
||||
, mProvidedPrincipal(aProvidedPrincipal)
|
||||
, mSourceDocument(aSourceDocument)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PostMessageEvent);
|
||||
}
|
||||
|
|
@ -169,7 +167,7 @@ PostMessageEvent::Run()
|
|||
if (shell)
|
||||
presContext = shell->GetPresContext();
|
||||
|
||||
event->SetTrusted(mTrustedCaller);
|
||||
event->SetTrusted(true);
|
||||
WidgetEvent* internalEvent = event->WidgetEventPtr();
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
|
|
|
|||
|
|
@ -33,8 +33,7 @@ public:
|
|||
const nsAString& aCallerOrigin,
|
||||
nsGlobalWindow* aTargetWindow,
|
||||
nsIPrincipal* aProvidedPrincipal,
|
||||
nsIDocument* aSourceDocument,
|
||||
bool aTrustedCaller);
|
||||
nsIDocument* aSourceDocument);
|
||||
|
||||
private:
|
||||
~PostMessageEvent();
|
||||
|
|
@ -44,7 +43,6 @@ private:
|
|||
RefPtr<nsGlobalWindow> mTargetWindow;
|
||||
nsCOMPtr<nsIPrincipal> mProvidedPrincipal;
|
||||
nsCOMPtr<nsIDocument> mSourceDocument;
|
||||
bool mTrustedCaller;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
|||
|
|
@ -8890,8 +8890,7 @@ nsGlobalWindow::PostMessageMozOuter(JSContext* aCx, JS::Handle<JS::Value> aMessa
|
|||
providedPrincipal,
|
||||
callerInnerWin
|
||||
? callerInnerWin->GetDoc()
|
||||
: nullptr,
|
||||
nsContentUtils::IsCallerChrome());
|
||||
: nullptr);
|
||||
|
||||
JS::Rooted<JS::Value> message(aCx, aMessage);
|
||||
JS::Rooted<JS::Value> transfer(aCx, aTransfer);
|
||||
|
|
|
|||
|
|
@ -1136,6 +1136,15 @@ nsPluginHost::GetPlugins(nsTArray<nsCOMPtr<nsIInternalPluginTag>>& aPluginArray,
|
|||
}
|
||||
plugin = plugin->mNext;
|
||||
}
|
||||
|
||||
// Durstenfeld shuffle
|
||||
size_t pluginCount = aPluginArray.Length();
|
||||
if (pluginCount >= 2) {
|
||||
for (size_t i = pluginCount - 1; i > 0; i--) {
|
||||
size_t j = rand() % (i + 1);
|
||||
std::swap(aPluginArray[i],aPluginArray[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME-jsplugins Check users for order of fake v non-fake
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
/**
|
||||
* File which includes stuff for Mozilla-specific checks which shouldn't happen
|
||||
* in other browsers but which we wish to test.
|
||||
*/
|
||||
|
||||
var isMozilla = navigator.product === "Gecko" && "buildID" in navigator;
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
[DEFAULT]
|
||||
support-files =
|
||||
browserFu.js
|
||||
postMessage_chrome_helper.html
|
||||
postMessage_closed_helper.html
|
||||
postMessage_hash.html
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>postMessage message receiver</title>
|
||||
<script type="application/javascript" src="browserFu.js"></script>
|
||||
<script type="application/javascript">
|
||||
function $(id) { return document.getElementById(id); }
|
||||
|
||||
|
|
@ -26,12 +25,6 @@
|
|||
response += " location(" + window.location.href + ")";
|
||||
}
|
||||
|
||||
if (isMozilla)
|
||||
{
|
||||
if (evt.isTrusted !== false)
|
||||
response += " unexpected-trusted";
|
||||
}
|
||||
|
||||
if (evt.type != "message")
|
||||
response += " wrong-type(" + evt.type + ")";
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ http://sub1.test1.example.org/tests/dom/tests/mochitest/whatwg/postMessage_joine
|
|||
-->
|
||||
<head>
|
||||
<title>postMessage joined domains, inner frame</title>
|
||||
<script type="application/javascript" src="browserFu.js"></script>
|
||||
<script type="application/javascript">
|
||||
function receiveMessage(evt)
|
||||
{
|
||||
|
|
@ -42,11 +41,6 @@ http://sub1.test1.example.org/tests/dom/tests/mochitest/whatwg/postMessage_joine
|
|||
response += " location(" + window.location.href + ")";
|
||||
}
|
||||
|
||||
if (isMozilla && evt.isTrusted === true)
|
||||
{
|
||||
response += " unexpected-trusted-event";
|
||||
}
|
||||
|
||||
var origin;
|
||||
if (data == "subframe-test-finished")
|
||||
origin = "http://example.org";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ http://example.org/tests/dom/tests/mochitest/whatwg/postMessage_joined_helper2.h
|
|||
-->
|
||||
<head>
|
||||
<title>postMessage joined domains, innermost frame</title>
|
||||
<script type="application/javascript" src="browserFu.js"></script>
|
||||
<script type="application/javascript">
|
||||
function receiveMessage(evt)
|
||||
{
|
||||
|
|
@ -27,12 +26,6 @@ http://example.org/tests/dom/tests/mochitest/whatwg/postMessage_joined_helper2.h
|
|||
response += " location(" + window.location.href + ")";
|
||||
}
|
||||
|
||||
if (isMozilla)
|
||||
{
|
||||
if (evt.isTrusted !== false)
|
||||
response += " unexpected-trusted-event";
|
||||
}
|
||||
|
||||
if (evt.source !== window.parent)
|
||||
{
|
||||
response += " unexpected-source(" + evt.source + ")";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=postMessage
|
|||
<head>
|
||||
<title>MessageEvent tests</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=postMessage
|
|||
<head>
|
||||
<title>Basic postMessage tests</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -52,10 +51,7 @@ function messageReceiver(evt)
|
|||
"postMessage creates events with empty lastEventId");
|
||||
is(evt.type, "message", "expected events of type 'message'");
|
||||
|
||||
if (isMozilla)
|
||||
{
|
||||
ok(evt.isTrusted === false, "shouldn't have been a trusted event");
|
||||
}
|
||||
ok(evt.isTrusted === true, "should have been a trusted event");
|
||||
|
||||
var data = evt.data;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=414815
|
|||
<head>
|
||||
<title>postMessage's interaction with a <base> tag</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<base href="http://example.com/" />
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<title>postMessage's interaction with closed windows</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
<head>
|
||||
<title>postMessage's interaction with hash URIs</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<base href="http://example.com/" />
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=postMessage
|
|||
<head>
|
||||
<title>postMessage uri/domain values and IDN encoding</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -31,10 +30,7 @@ function receiveMessage(evt)
|
|||
ok(evt instanceof MessageEvent, "umm, how did we get this?");
|
||||
is(evt.type, "message", "expected events of type 'message'");
|
||||
|
||||
if (isMozilla)
|
||||
{
|
||||
ok(evt.isTrusted === false, "shouldn't have been a trusted event");
|
||||
}
|
||||
ok(evt.isTrusted === true, "should have been a trusted event");
|
||||
|
||||
is(evt.origin, "http://sub1.ält.example.org:8000",
|
||||
"wrong origin -- IDN issue, perhaps?");
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=430251
|
|||
<head>
|
||||
<title>postMessage's interaction with pages at jar: URIs</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
<base href="http://mochi.test:8888/" />
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=postMessage
|
|||
<head>
|
||||
<title>postMessage with document.domain setting to join origins</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -29,10 +28,7 @@ function receiveTestResult(evt)
|
|||
ok(evt instanceof MessageEvent, "umm, how did we get this?");
|
||||
is(evt.type, "message", "expected events of type 'message'");
|
||||
|
||||
if (isMozilla)
|
||||
{
|
||||
ok(evt.isTrusted === false, "shouldn't have been a trusted event");
|
||||
}
|
||||
ok(evt.isTrusted === true, "should have been a trusted event");
|
||||
|
||||
is(evt.lastEventId, "", "postMessage creates events with empty lastEventId");
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=417075
|
|||
<head>
|
||||
<title>postMessage from about:blank, data URLs</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=postMessage
|
|||
<head>
|
||||
<title>postMessage from about:blank, data URLs</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -109,10 +108,7 @@ function messageReceiver(evt)
|
|||
ok(evt instanceof MessageEvent, "umm, how did we get this?");
|
||||
is(evt.type, "message", "expected events of type 'message'");
|
||||
|
||||
if (isMozilla)
|
||||
{
|
||||
ok(evt.isTrusted === false, "shouldn't have been a trusted event");
|
||||
}
|
||||
ok(evt.isTrusted === true, "should have been a trusted event");
|
||||
|
||||
if (evt.data === "about:blank-response")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=822094
|
|||
<head><meta charset=utf-8>
|
||||
<title>postMessage transferable tests</title>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="browserFu.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue