浏览代码

LibWeb: Node::is_parent_node() should return true for DocumentFragments

Andreas Kling 5 年之前
父节点
当前提交
3ad1e7d6b7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Libraries/LibWeb/DOM/Node.h

+ 1 - 1
Libraries/LibWeb/DOM/Node.h

@@ -80,7 +80,7 @@ public:
     bool is_comment() const { return type() == NodeType::COMMENT_NODE; }
     bool is_character_data() const { return type() == NodeType::TEXT_NODE || type() == NodeType::COMMENT_NODE; }
     bool is_document_fragment() const { return type() == NodeType::DOCUMENT_FRAGMENT_NODE; }
-    bool is_parent_node() const { return is_element() || is_document(); }
+    bool is_parent_node() const { return is_element() || is_document() || is_document_fragment(); }
 
     virtual RefPtr<LayoutNode> create_layout_node(const StyleProperties* parent_style) const;