mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1216260 - Replace mozMatchesSelector with matches in add-on SDK. r=matteo
This commit is contained in:
parent
902b163621
commit
6898bfcc30
@ -183,7 +183,7 @@ CONTEXTS.SelectorContext = Class({
|
||||
let selector = this.selector;
|
||||
|
||||
while (!(popupNode instanceof Ci.nsIDOMDocument)) {
|
||||
if (popupNode.mozMatchesSelector(selector))
|
||||
if (popupNode.matches(selector))
|
||||
return popupNode;
|
||||
|
||||
popupNode = popupNode.parentNode;
|
||||
|
@ -294,21 +294,21 @@ exports.testStringOverload = createProxyTest(html, function (helper, assert) {
|
||||
);
|
||||
});
|
||||
|
||||
exports["test MozMatchedSelector"] = createProxyTest("", function (helper) {
|
||||
exports["test Element.matches()"] = createProxyTest("", function (helper) {
|
||||
helper.createWorker(
|
||||
'new ' + function ContentScriptScope() {
|
||||
// Check mozMatchesSelector XrayWrappers bug:
|
||||
// mozMatchesSelector returns bad results when we are not calling it from the node itself
|
||||
// SEE BUG 658909: mozMatchesSelector returns incorrect results with XrayWrappers
|
||||
assert(document.createElement( "div" ).mozMatchesSelector("div"),
|
||||
"mozMatchesSelector works while being called from the node");
|
||||
assert(document.documentElement.mozMatchesSelector.call(
|
||||
// Check matches XrayWrappers bug (Bug 658909):
|
||||
// Test that Element.matches() does not return bad results when we are
|
||||
// not calling it from the node itself.
|
||||
assert(document.createElement( "div" ).matches("div"),
|
||||
"matches works while being called from the node");
|
||||
assert(document.documentElement.matches.call(
|
||||
document.createElement( "div" ),
|
||||
"div"
|
||||
),
|
||||
"mozMatchesSelector works while being called from a " +
|
||||
"matches works while being called from a " +
|
||||
"function reference to " +
|
||||
"document.documentElement.mozMatchesSelector.call");
|
||||
"document.documentElement.matches.call");
|
||||
done();
|
||||
}
|
||||
);
|
||||
|
@ -294,21 +294,21 @@ exports.testStringOverload = createProxyTest(html, function (helper, assert) {
|
||||
);
|
||||
});
|
||||
|
||||
exports["test MozMatchedSelector"] = createProxyTest("", function (helper) {
|
||||
exports["test Element.matches()"] = createProxyTest("", function (helper) {
|
||||
helper.createWorker(
|
||||
'new ' + function ContentScriptScope() {
|
||||
// Check mozMatchesSelector XrayWrappers bug:
|
||||
// mozMatchesSelector returns bad results when we are not calling it from the node itself
|
||||
// SEE BUG 658909: mozMatchesSelector returns incorrect results with XrayWrappers
|
||||
assert(document.createElement( "div" ).mozMatchesSelector("div"),
|
||||
"mozMatchesSelector works while being called from the node");
|
||||
assert(document.documentElement.mozMatchesSelector.call(
|
||||
// Check matches XrayWrappers bug (Bug 658909):
|
||||
// Test that Element.matches() does not return bad results when we are
|
||||
// not calling it from the node itself.
|
||||
assert(document.createElement( "div" ).matches("div"),
|
||||
"matches works while being called from the node");
|
||||
assert(document.documentElement.matches.call(
|
||||
document.createElement( "div" ),
|
||||
"div"
|
||||
),
|
||||
"mozMatchesSelector works while being called from a " +
|
||||
"matches works while being called from a " +
|
||||
"function reference to " +
|
||||
"document.documentElement.mozMatchesSelector.call");
|
||||
"document.documentElement.matches.call");
|
||||
done();
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user