aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 4c7d24f8f4f..0242363dbf7 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -1216,17 +1216,15 @@ impl Node {
// Step 4-5.
match node.type_id() {
TextNodeTypeId => {
- match node.parent_node().root() {
- Some(ref parent) if parent.is_document() => return Err(HierarchyRequest),
- _ => ()
+ if parent.is_document() {
+ return Err(HierarchyRequest);
}
- }
+ },
DoctypeNodeTypeId => {
- match node.parent_node().root() {
- Some(ref parent) if !parent.is_document() => return Err(HierarchyRequest),
- _ => ()
+ if !parent.is_document() {
+ return Err(HierarchyRequest);
}
- }
+ },
DocumentFragmentNodeTypeId |
ElementNodeTypeId(_) |
ProcessingInstructionNodeTypeId |