mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix for bug 817420 (new bindings api for element broke cloud9/apf) - don't register Element prototype yet, we need to convert plain elements to the new DOM binding first. r=bz.
This commit is contained in:
parent
db4f2771da
commit
651e0b5988
@ -200,6 +200,7 @@ DOMInterfaces = {
|
|||||||
# needed.
|
# needed.
|
||||||
'prefable': True,
|
'prefable': True,
|
||||||
'hasXPConnectImpls': True,
|
'hasXPConnectImpls': True,
|
||||||
|
'register': False,
|
||||||
'hasInstanceInterface': 'nsIDOMElement',
|
'hasInstanceInterface': 'nsIDOMElement',
|
||||||
'resultNotAddRefed': [
|
'resultNotAddRefed': [
|
||||||
'classList', 'attributes', 'children', 'firstElementChild',
|
'classList', 'attributes', 'children', 'firstElementChild',
|
||||||
|
@ -155,13 +155,11 @@
|
|||||||
"EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.doctype with too few arguments must throw TypeError": true,
|
"EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on document.doctype with too few arguments must throw TypeError": true,
|
||||||
"EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.doctype with too few arguments must throw TypeError": true,
|
"EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on document.doctype with too few arguments must throw TypeError": true,
|
||||||
"EventTarget interface: calling dispatchEvent(Event) on document.doctype with too few arguments must throw TypeError": true,
|
"EventTarget interface: calling dispatchEvent(Event) on document.doctype with too few arguments must throw TypeError": true,
|
||||||
"Element interface: attribute namespaceURI": true,
|
"Element interface: existence and properties of interface object": true,
|
||||||
"Element interface: attribute prefix": true,
|
"Element interface: existence and properties of interface prototype object": true,
|
||||||
"Element interface: attribute localName": true,
|
"Element interface: existence and properties of interface prototype object's \"constructor\" property": true,
|
||||||
"Element interface: attribute className": true,
|
"Element interface: attribute className": true,
|
||||||
"Element interface: attribute attributes": true,
|
|
||||||
"Element interface: operation remove()": true,
|
"Element interface: operation remove()": true,
|
||||||
"Element must be primary interface of element": true,
|
|
||||||
"Stringification of element": "debug",
|
"Stringification of element": "debug",
|
||||||
"Element interface: element must inherit property \"className\" with the proper type (5)": true,
|
"Element interface: element must inherit property \"className\" with the proper type (5)": true,
|
||||||
"Element interface: element must inherit property \"remove\" with the proper type (25)": true,
|
"Element interface: element must inherit property \"remove\" with the proper type (25)": true,
|
||||||
|
@ -136,6 +136,7 @@ MOCHITEST_FILES = \
|
|||||||
file_bug809290_c.html \
|
file_bug809290_c.html \
|
||||||
file_empty.html \
|
file_empty.html \
|
||||||
test_sizetocontent_clamp.html \
|
test_sizetocontent_clamp.html \
|
||||||
|
test_protochains.html \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifneq (Linux,$(OS_ARCH))
|
ifneq (Linux,$(OS_ARCH))
|
||||||
|
60
dom/tests/mochitest/bugs/test_protochains.html
Normal file
60
dom/tests/mochitest/bugs/test_protochains.html
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<!--
|
||||||
|
https://bugzilla.mozilla.org/show_bug.cgi?id=817420
|
||||||
|
-->
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Test for Bug 817420</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=817420">Mozilla Bug 817420</a>
|
||||||
|
<p id="display"></p>
|
||||||
|
<div id="content" style="display: none">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<pre id="test">
|
||||||
|
<script type="application/javascript">
|
||||||
|
|
||||||
|
/** Test for Bug 817420 **/
|
||||||
|
is(Object.getPrototypeOf(HTMLElement.prototype), Element.prototype,
|
||||||
|
"Must have correct proto chain for HTMLElement.prototype");
|
||||||
|
is(Object.getPrototypeOf(document.createElementNS(null, "x")),
|
||||||
|
Element.prototype,
|
||||||
|
"Must have correct proto chain for random element");
|
||||||
|
// Todo because of HTMLUnknownElement
|
||||||
|
todo_is(Object.getPrototypeOf(document.createElement("noSuchElementName")),
|
||||||
|
HTMLElement.prototype,
|
||||||
|
"Must have correct proto chain for random HTML element");
|
||||||
|
|
||||||
|
// And check that it's really working as it should
|
||||||
|
function checkPropPresent(propName, objList, expected)
|
||||||
|
{
|
||||||
|
for (obj of objList) {
|
||||||
|
is(propName in obj,
|
||||||
|
expected,
|
||||||
|
obj + " should " + (expected ? "" : "not ") + "have the property");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var objList = [ Element.prototype,
|
||||||
|
HTMLElement.prototype,
|
||||||
|
document.createElementNS(null, "x"),
|
||||||
|
document.createElement("noSuchElementName"),
|
||||||
|
document.body ]
|
||||||
|
checkPropPresent("somePropertyThatBetterNeverExist", objList, false);
|
||||||
|
Element.prototype.somePropertyThatBetterNeverExist = 1;
|
||||||
|
checkPropPresent("somePropertyThatBetterNeverExist", objList, true);
|
||||||
|
|
||||||
|
objList = [ HTMLElement.prototype,
|
||||||
|
document.createElement("noSuchElementName"),
|
||||||
|
document.body ]
|
||||||
|
checkPropPresent("someOtherPropertyThatBetterNeverExist", objList, false);
|
||||||
|
HTMLElement.prototype.someOtherPropertyThatBetterNeverExist = 1;
|
||||||
|
checkPropPresent("someOtherPropertyThatBetterNeverExist", objList, true);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</pre>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user