diff options
author | Ben Murdoch <benm@google.com> | 2009-08-18 15:36:45 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-18 19:20:06 +0100 |
commit | d227fc870c7a697500a3c900c31baf05fb9a8524 (patch) | |
tree | a3fa109aa5bf52fef562ac49d97a2f723889cc71 /WebCore/dom/DocumentFragment.cpp | |
parent | f2c627513266faa73f7669058d98c60769fb3524 (diff) | |
download | external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.zip external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.tar.gz external_webkit-d227fc870c7a697500a3c900c31baf05fb9a8524.tar.bz2 |
Merge WebKit r47420
Diffstat (limited to 'WebCore/dom/DocumentFragment.cpp')
-rw-r--r-- | WebCore/dom/DocumentFragment.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/WebCore/dom/DocumentFragment.cpp b/WebCore/dom/DocumentFragment.cpp index 7a6174f..3663e99 100644 --- a/WebCore/dom/DocumentFragment.cpp +++ b/WebCore/dom/DocumentFragment.cpp @@ -1,10 +1,8 @@ -/** - * This file is part of the DOM implementation for KDE. - * +/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2001 Dirk Mueller (mueller@kde.org) - * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. + * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -23,13 +21,18 @@ */ #include "config.h" - #include "DocumentFragment.h" namespace WebCore { -DocumentFragment::DocumentFragment(Document *doc) : ContainerNode(doc) +inline DocumentFragment::DocumentFragment(Document* document) + : ContainerNode(document) +{ +} + +PassRefPtr<DocumentFragment> DocumentFragment::create(Document* document) { + return adoptRef(new DocumentFragment(document)); } String DocumentFragment::nodeName() const @@ -42,7 +45,6 @@ Node::NodeType DocumentFragment::nodeType() const return DOCUMENT_FRAGMENT_NODE; } -// DOM Section 1.1.1 bool DocumentFragment::childTypeAllowed(NodeType type) { switch (type) { @@ -60,7 +62,7 @@ bool DocumentFragment::childTypeAllowed(NodeType type) PassRefPtr<Node> DocumentFragment::cloneNode(bool deep) { - RefPtr<DocumentFragment> clone = new DocumentFragment(document()); + RefPtr<DocumentFragment> clone = create(document()); if (deep) cloneChildNodes(clone.get()); return clone.release(); |