mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Clone node on a shadow root should always throw an error (#34742)
* Corrected Node-prototype-cloneNode clone part test Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * Corrected node code Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * updated MANIFEST Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * removed fails expectations Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> * Removed not legacy ini file Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com> --------- Signed-off-by: Domenico Rizzo <domenico.rizzo@gmail.com>
This commit is contained in:
parent
6bd6d3bc86
commit
1dfb44d7b8
6 changed files with 3 additions and 15 deletions
|
@ -2946,7 +2946,7 @@ impl NodeMethods<crate::DomTypeHolder> for Node {
|
||||||
|
|
||||||
/// <https://dom.spec.whatwg.org/#dom-node-clonenode>
|
/// <https://dom.spec.whatwg.org/#dom-node-clonenode>
|
||||||
fn CloneNode(&self, deep: bool, can_gc: CanGc) -> Fallible<DomRoot<Node>> {
|
fn CloneNode(&self, deep: bool, can_gc: CanGc) -> Fallible<DomRoot<Node>> {
|
||||||
if deep && self.is::<ShadowRoot>() {
|
if self.is::<ShadowRoot>() {
|
||||||
return Err(Error::NotSupported);
|
return Err(Error::NotSupported);
|
||||||
}
|
}
|
||||||
Ok(Node::clone(
|
Ok(Node::clone(
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[test-010.html]
|
|
||||||
[A_10_01_02_09_T01]
|
|
||||||
expected: FAIL
|
|
2
tests/wpt/meta/MANIFEST.json
vendored
2
tests/wpt/meta/MANIFEST.json
vendored
|
@ -765700,7 +765700,7 @@
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
"Node-prototype-cloneNode.html": [
|
"Node-prototype-cloneNode.html": [
|
||||||
"0ee47d492e5ad0ec8c00d15d4897c19772c9651d",
|
"2f2a1110fc75a8eb199f9b1ae12e5f8d6377f08d",
|
||||||
[
|
[
|
||||||
null,
|
null,
|
||||||
{}
|
{}
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
[Node-prototype-cloneNode.html]
|
|
||||||
[cloneNode on a shadow root in open mode must throw a NotSupportedError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[cloneNode on a shadow root in closed mode must throw a NotSupportedError]
|
|
||||||
expected: FAIL
|
|
|
@ -1,3 +0,0 @@
|
||||||
[test-010.html]
|
|
||||||
[A_10_01_02_09_T01]
|
|
||||||
expected: FAIL
|
|
|
@ -23,7 +23,7 @@ function testCloneNode(mode) {
|
||||||
assert_throws_dom('NotSupportedError', function () {
|
assert_throws_dom('NotSupportedError', function () {
|
||||||
var element = document.createElement('div');
|
var element = document.createElement('div');
|
||||||
var shadowRoot = element.attachShadow({mode: mode});
|
var shadowRoot = element.attachShadow({mode: mode});
|
||||||
shadowRoot.cloneNode(false);
|
shadowRoot.cloneNode(true);
|
||||||
}, 'cloneNode(true) on a closed shadow root must throw a NotSupportedError');
|
}, 'cloneNode(true) on a closed shadow root must throw a NotSupportedError');
|
||||||
|
|
||||||
}, 'cloneNode on a shadow root in ' + mode + ' mode must throw a NotSupportedError');
|
}, 'cloneNode on a shadow root in ' + mode + ' mode must throw a NotSupportedError');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue