diff options
author | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2019-01-29 15:06:34 +0100 |
---|---|---|
committer | Fernando Jiménez Moreno <ferjmoreno@gmail.com> | 2019-04-26 10:17:46 +0200 |
commit | 6a85409ffe674f92c08d5d79c4b6fe68dac5ad93 (patch) | |
tree | 59ddd1b4d848c56ae597f5a11fa0e6b3f96e5804 /components/script/dom/range.rs | |
parent | d6ddb08e23965c3b037bb61829015009a30f86fa (diff) | |
download | servo-6a85409ffe674f92c08d5d79c4b6fe68dac5ad93.tar.gz servo-6a85409ffe674f92c08d5d79c4b6fe68dac5ad93.zip |
Throw NotSupported when trying to deep clone a shadow root
Diffstat (limited to 'components/script/dom/range.rs')
-rw-r--r-- | components/script/dom/range.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/components/script/dom/range.rs b/components/script/dom/range.rs index 96f276944bc..afa759de52f 100644 --- a/components/script/dom/range.rs +++ b/components/script/dom/range.rs @@ -500,7 +500,7 @@ impl RangeMethods for Range { fragment.upcast::<Node>().AppendChild(&clone)?; } else { // Step 14.1. - let clone = child.CloneNode(false); + let clone = child.CloneNode(/* deep */ false)?; // Step 14.2. fragment.upcast::<Node>().AppendChild(&clone)?; // Step 14.3. @@ -521,7 +521,7 @@ impl RangeMethods for Range { // Step 15. for child in contained_children { // Step 15.1. - let clone = child.CloneNode(true); + let clone = child.CloneNode(/* deep */ true)?; // Step 15.2. fragment.upcast::<Node>().AppendChild(&clone)?; } @@ -537,7 +537,7 @@ impl RangeMethods for Range { fragment.upcast::<Node>().AppendChild(&clone)?; } else { // Step 17.1. - let clone = child.CloneNode(false); + let clone = child.CloneNode(/* deep */ false)?; // Step 17.2. fragment.upcast::<Node>().AppendChild(&clone)?; // Step 17.3. @@ -573,7 +573,7 @@ impl RangeMethods for Range { if end_node == start_node { if let Some(end_data) = end_node.downcast::<CharacterData>() { // Step 4.1. - let clone = end_node.CloneNode(true); + let clone = end_node.CloneNode(/* deep */ true)?; // Step 4.2. let text = end_data.SubstringData(start_offset, end_offset - start_offset); clone @@ -614,7 +614,7 @@ impl RangeMethods for Range { if let Some(start_data) = child.downcast::<CharacterData>() { assert!(child == start_node); // Step 15.1. - let clone = start_node.CloneNode(true); + let clone = start_node.CloneNode(/* deep */ true)?; // Step 15.2. let text = start_data.SubstringData(start_offset, start_node.len() - start_offset); clone @@ -631,7 +631,7 @@ impl RangeMethods for Range { )?; } else { // Step 16.1. - let clone = child.CloneNode(false); + let clone = child.CloneNode(/* deep */ false)?; // Step 16.2. fragment.upcast::<Node>().AppendChild(&clone)?; // Step 16.3. @@ -658,7 +658,7 @@ impl RangeMethods for Range { if let Some(end_data) = child.downcast::<CharacterData>() { assert!(child == end_node); // Step 18.1. - let clone = end_node.CloneNode(true); + let clone = end_node.CloneNode(/* deep */ true)?; // Step 18.2. let text = end_data.SubstringData(0, end_offset); clone @@ -671,7 +671,7 @@ impl RangeMethods for Range { end_data.ReplaceData(0, end_offset, DOMString::new())?; } else { // Step 19.1. - let clone = child.CloneNode(false); + let clone = child.CloneNode(/* deep */ false)?; // Step 19.2. fragment.upcast::<Node>().AppendChild(&clone)?; // Step 19.3. |