mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
038ec9ba75
182 changed files with 104 additions and 3762 deletions
|
|
@ -1026,11 +1026,6 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual bool watch(JSContext *cx, JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id, JS::Handle<JSObject*> callable) const override;
|
||||
virtual bool unwatch(JSContext *cx, JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id) const override;
|
||||
|
||||
static void ObjectMoved(JSObject *obj, const JSObject *old);
|
||||
|
||||
static const nsOuterWindowProxy singleton;
|
||||
|
|
@ -1398,20 +1393,6 @@ nsOuterWindowProxy::AppendIndexedPropertyNames(JSContext *cx, JSObject *proxy,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
nsOuterWindowProxy::watch(JSContext *cx, JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id, JS::Handle<JSObject*> callable) const
|
||||
{
|
||||
return js::WatchGuts(cx, proxy, id, callable);
|
||||
}
|
||||
|
||||
bool
|
||||
nsOuterWindowProxy::unwatch(JSContext *cx, JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id) const
|
||||
{
|
||||
return js::UnwatchGuts(cx, proxy, id);
|
||||
}
|
||||
|
||||
void
|
||||
nsOuterWindowProxy::ObjectMoved(JSObject *obj, const JSObject *old)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1968,8 +1968,6 @@ const js::ObjectOps sInterfaceObjectClassObjectOps = {
|
|||
nullptr, /* setProperty */
|
||||
nullptr, /* getOwnPropertyDescriptor */
|
||||
nullptr, /* deleteProperty */
|
||||
nullptr, /* watch */
|
||||
nullptr, /* unwatch */
|
||||
nullptr, /* getElements */
|
||||
nullptr, /* enumerate */
|
||||
InterfaceObjectToString, /* funToString */
|
||||
|
|
|
|||
|
|
@ -13169,9 +13169,9 @@ class CGDictionary(CGThing):
|
|||
# continues to match the list in test_Object.prototype_props.html
|
||||
if (member.identifier.name in
|
||||
["constructor", "toSource", "toString", "toLocaleString", "valueOf",
|
||||
"watch", "unwatch", "hasOwnProperty", "isPrototypeOf",
|
||||
"propertyIsEnumerable", "__defineGetter__", "__defineSetter__",
|
||||
"__lookupGetter__", "__lookupSetter__", "__proto__"]):
|
||||
"hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable",
|
||||
"__defineGetter__", "__defineSetter__", "__lookupGetter__",
|
||||
"__lookupSetter__", "__proto__"]):
|
||||
raise TypeError("'%s' member of %s dictionary shadows "
|
||||
"a property of Object.prototype, and Xrays to "
|
||||
"Object can't handle that.\n"
|
||||
|
|
|
|||
|
|
@ -274,19 +274,6 @@ DOMProxyHandler::delete_(JSContext* cx, JS::Handle<JSObject*> proxy,
|
|||
return result.succeed();
|
||||
}
|
||||
|
||||
bool
|
||||
BaseDOMProxyHandler::watch(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
|
||||
JS::Handle<JSObject*> callable) const
|
||||
{
|
||||
return js::WatchGuts(cx, proxy, id, callable);
|
||||
}
|
||||
|
||||
bool
|
||||
BaseDOMProxyHandler::unwatch(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id) const
|
||||
{
|
||||
return js::UnwatchGuts(cx, proxy, id);
|
||||
}
|
||||
|
||||
bool
|
||||
BaseDOMProxyHandler::ownPropertyKeys(JSContext* cx,
|
||||
JS::Handle<JSObject*> proxy,
|
||||
|
|
|
|||
|
|
@ -72,11 +72,6 @@ public:
|
|||
virtual bool getOwnEnumerablePropertyKeys(JSContext* cx, JS::Handle<JSObject*> proxy,
|
||||
JS::AutoIdVector &props) const override;
|
||||
|
||||
bool watch(JSContext* cx, JS::Handle<JSObject*> proxy, JS::Handle<jsid> id,
|
||||
JS::Handle<JSObject*> callable) const override;
|
||||
bool unwatch(JSContext* cx, JS::Handle<JSObject*> proxy,
|
||||
JS::Handle<jsid> id) const override;
|
||||
|
||||
protected:
|
||||
// Hook for subclasses to implement shared ownPropertyKeys()/keys()
|
||||
// functionality. The "flags" argument is either JSITER_OWNONLY (for keys())
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ test(function() {
|
|||
// Codegen.py's CGDictionary.getMemberDefinition method.
|
||||
var expected = [
|
||||
"constructor", "toSource", "toString", "toLocaleString", "valueOf",
|
||||
"watch", "unwatch", "hasOwnProperty", "isPrototypeOf",
|
||||
"propertyIsEnumerable", "__defineGetter__", "__defineSetter__",
|
||||
"__lookupGetter__", "__lookupSetter__", "__proto__"
|
||||
"hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable",
|
||||
"__defineGetter__", "__defineSetter__", "__lookupGetter__",
|
||||
"__lookupSetter__", "__proto__"
|
||||
];
|
||||
assert_array_equals(props.sort(), expected.sort());
|
||||
}, "Own properties of Object.prototype");
|
||||
|
|
|
|||
|
|
@ -553,7 +553,6 @@ skip-if = true # Disabled for timeouts.
|
|||
[test_viewport.html]
|
||||
[test_documentAll.html]
|
||||
[test_document-element-inserted.html]
|
||||
[test_document.watch.html]
|
||||
[test_bug445004.html]
|
||||
skip-if = true || toolkit == 'android' # Disabled permanently (bug 559932).
|
||||
[test_bug446483.html]
|
||||
|
|
|
|||
|
|
@ -1,129 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=903332
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 903332</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 903332 **/
|
||||
|
||||
var watch1Called;
|
||||
function watch1(prop, oldValue, newValue)
|
||||
{
|
||||
is(watch1Called, false, "watch1Called not reset properly?");
|
||||
watch1Called = true;
|
||||
|
||||
is(prop, "cookie", "wrong property name passed to watch1");
|
||||
return newValue;
|
||||
}
|
||||
|
||||
var watch2Called;
|
||||
function watch2(prop, oldValue, newValue)
|
||||
{
|
||||
is(watch2Called, false, "watch2Called not reset properly?");
|
||||
watch2Called = true;
|
||||
|
||||
is(prop, "cookie", "wrong property name passed to watch2");
|
||||
return newValue;
|
||||
}
|
||||
|
||||
// Just in case subsequent tests depend on a particular value...
|
||||
var originalValue = document.cookie;
|
||||
ok(true, "originalValue: " + originalValue);
|
||||
|
||||
var originalPrefix = originalValue.length > 0 ? originalValue + "; " : "";
|
||||
|
||||
try
|
||||
{
|
||||
// trial set (no watch) to verify things work
|
||||
document.cookie = "first=set";
|
||||
is(document.cookie, originalPrefix + "first=set",
|
||||
"first value correct");
|
||||
|
||||
// add a watch
|
||||
document.watch("cookie", watch1);
|
||||
|
||||
// set, check for watch invoked
|
||||
watch1Called = false;
|
||||
document.cookie = "second=set";
|
||||
is(watch1Called, true, "watch1 function should be called");
|
||||
is(document.cookie, originalPrefix + "first=set; second=set",
|
||||
"second value correct");
|
||||
|
||||
// and a second time, just in case
|
||||
watch1Called = false;
|
||||
document.cookie = "third=set";
|
||||
is(watch1Called, true, "watch1 function should be called");
|
||||
is(document.cookie, originalPrefix + "first=set; second=set; third=set",
|
||||
"third value correct");
|
||||
|
||||
// overwrite the current watch with a new one
|
||||
document.watch("cookie", watch2);
|
||||
|
||||
// set, check for watch invoked
|
||||
watch1Called = false;
|
||||
watch2Called = false;
|
||||
document.cookie = "fourth=set";
|
||||
is(watch1Called, false, "watch1 invoked erroneously");
|
||||
is(watch2Called, true, "watch2 function should be called");
|
||||
is(document.cookie, originalPrefix + "first=set; second=set; third=set; fourth=set",
|
||||
"fourth value correct");
|
||||
|
||||
// and a second time, just in case
|
||||
watch1Called = false;
|
||||
watch2Called = false;
|
||||
document.cookie = "fifth=set";
|
||||
is(watch1Called, false, "watch1 invoked erroneously");
|
||||
is(watch2Called, true, "watch2 function should be called");
|
||||
is(document.cookie, originalPrefix + "first=set; second=set; third=set; fourth=set; fifth=set",
|
||||
"fifth value correct");
|
||||
|
||||
// remove the watch
|
||||
document.unwatch("cookie");
|
||||
|
||||
// check for non-invocation now
|
||||
watch1Called = false;
|
||||
watch2Called = false;
|
||||
document.cookie = "sixth=set";
|
||||
is(watch1Called, false, "watch1 shouldn't be called");
|
||||
is(watch2Called, false, "watch2 shouldn't be called");
|
||||
is(document.cookie, originalPrefix + "first=set; second=set; third=set; fourth=set; fifth=set; sixth=set",
|
||||
"sixth value correct");
|
||||
}
|
||||
finally
|
||||
{
|
||||
// reset
|
||||
document.unwatch("cookie"); // harmless, should be no-op except if bugs
|
||||
|
||||
var d = new Date();
|
||||
d.setTime(0);
|
||||
var suffix = "=; expires=" + d.toGMTString();
|
||||
|
||||
document.cookie = "first" + suffix;
|
||||
document.cookie = "second" + suffix;
|
||||
document.cookie = "third" + suffix;
|
||||
document.cookie = "fourth" + suffix;
|
||||
document.cookie = "fifth" + suffix;
|
||||
document.cookie = "sixth" + suffix;
|
||||
}
|
||||
|
||||
is(document.cookie, originalValue,
|
||||
"document.cookie isn't what it was initially! expect bustage further " +
|
||||
"down the line");
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=903332">Mozilla Bug 903332</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -248,7 +248,6 @@ const static js::ObjectOps sNPObjectJSWrapperObjectOps = {
|
|||
nullptr, // setProperty
|
||||
nullptr, // getOwnPropertyDescriptor
|
||||
nullptr, // deleteProperty
|
||||
nullptr, nullptr, // watch/unwatch
|
||||
nullptr, // getElements
|
||||
NPObjWrapper_Enumerate,
|
||||
nullptr,
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<script>//<![CDATA[
|
||||
|
||||
function add_watch()
|
||||
{
|
||||
document.getElementById("p").transform.baseVal.watch("0", function(){});
|
||||
}
|
||||
|
||||
window.addEventListener("load", add_watch, false);
|
||||
|
||||
//]]></script>
|
||||
|
||||
<path id="p" transform="scale(1)" />
|
||||
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 282 B |
|
|
@ -1,15 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<script>//<![CDATA[
|
||||
|
||||
function add_watch()
|
||||
{
|
||||
document.getElementById("e").x.baseVal.watch("0", function(){});
|
||||
}
|
||||
|
||||
window.addEventListener("load", add_watch, false);
|
||||
|
||||
//]]></script>
|
||||
|
||||
<text id="e" x="10">foo</text>
|
||||
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 268 B |
|
|
@ -1,15 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<script>//<![CDATA[
|
||||
|
||||
function add_watch()
|
||||
{
|
||||
document.getElementById("e").rotate.baseVal.watch("0", function(){});
|
||||
}
|
||||
|
||||
window.addEventListener("load", add_watch, false);
|
||||
|
||||
//]]></script>
|
||||
|
||||
<text id="e" rotate="10">foo</text>
|
||||
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 278 B |
|
|
@ -1,15 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<script>//<![CDATA[
|
||||
|
||||
function add_watch()
|
||||
{
|
||||
document.getElementById("e").pathSegList.watch("0", function(){});
|
||||
}
|
||||
|
||||
window.addEventListener("load", add_watch, false);
|
||||
|
||||
//]]></script>
|
||||
|
||||
<path id="e" d="M0,0"/>
|
||||
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 263 B |
|
|
@ -1,15 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<script>//<![CDATA[
|
||||
|
||||
function add_watch()
|
||||
{
|
||||
document.getElementById("e").points.watch("0", function(){});
|
||||
}
|
||||
|
||||
window.addEventListener("load", add_watch, false);
|
||||
|
||||
//]]></script>
|
||||
|
||||
<polygon id="e" points="0,0"/>
|
||||
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 265 B |
|
|
@ -66,11 +66,6 @@ load 837450-1.svg
|
|||
load 842463-1.html
|
||||
load 847138-1.svg
|
||||
load 864509.svg
|
||||
load 880544-1.svg
|
||||
load 880544-2.svg
|
||||
load 880544-3.svg
|
||||
load 880544-4.svg
|
||||
load 880544-5.svg
|
||||
load 898915-1.svg
|
||||
load 1035248-1.svg
|
||||
load 1035248-2.svg
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Iframe test for bug 38959</title>
|
||||
</head>
|
||||
<body">
|
||||
<script>
|
||||
|
||||
x = false;
|
||||
window.opener.postMessage(1, "http://mochi.test:8888");
|
||||
window.close();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Iframe test for bug 38959</title>
|
||||
</head>
|
||||
<body">
|
||||
<script>
|
||||
|
||||
x = true;
|
||||
window.opener.postMessage(2, "http://mochi.test:8888");
|
||||
window.close();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -23,8 +23,6 @@ support-files =
|
|||
grandchild_bug260264.html
|
||||
iframe_bug304459-1.html
|
||||
iframe_bug304459-2.html
|
||||
iframe_bug38959-1.html
|
||||
iframe_bug38959-2.html
|
||||
iframe_bug430276-2.html
|
||||
iframe_bug430276.html
|
||||
iframe_bug440572.html
|
||||
|
|
@ -64,7 +62,6 @@ skip-if = toolkit == 'android' #TIMED_OUT
|
|||
[test_bug377539.html]
|
||||
[test_bug384122.html]
|
||||
[test_bug389366.html]
|
||||
[test_bug38959.html]
|
||||
[test_bug393974.html]
|
||||
[test_bug394769.html]
|
||||
[test_bug396843.html]
|
||||
|
|
|
|||
|
|
@ -1,57 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=38959
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 38959</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=38959">Mozilla Bug 38959</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
<iframe id="frame"></iframe>
|
||||
</div>
|
||||
<pre id="test">
|
||||
<script type="application/javascript">
|
||||
|
||||
/** Test for Bug 38959 **/
|
||||
|
||||
var newValue;
|
||||
|
||||
function watcher(id, ol, ne)
|
||||
{
|
||||
newValue = ne;
|
||||
return ne;
|
||||
}
|
||||
|
||||
function openWindow(url, crossOrigin)
|
||||
{
|
||||
newValue = true;
|
||||
var w = window.open(url);
|
||||
w.watch("x", watcher);
|
||||
}
|
||||
|
||||
function receiveMessage(evt)
|
||||
{
|
||||
ok(newValue, "Watchpoints only allowed same-origin.");
|
||||
if (evt.data == 1) {
|
||||
openWindow("/tests/dom/tests/mochitest/bugs/iframe_bug38959-2.html");
|
||||
}
|
||||
else {
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
window.addEventListener("message", receiveMessage, false);
|
||||
|
||||
openWindow("http://example.org/tests/dom/tests/mochitest/bugs/iframe_bug38959-1.html");
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue