1967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch/*
2967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * Copyright (C) 2010 Google Inc. All rights reserved.
3967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch *
4967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * Redistribution and use in source and binary forms, with or without
5967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * modification, are permitted provided that the following conditions are
6967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * met:
7967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch *
8967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch *     * Redistributions of source code must retain the above copyright
9967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * notice, this list of conditions and the following disclaimer.
10967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch *     * Redistributions in binary form must reproduce the above
11967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * copyright notice, this list of conditions and the following disclaimer
12967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * in the documentation and/or other materials provided with the
13967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * distribution.
14967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch *     * Neither the name of Google Inc. nor the names of its
15967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * contributors may be used to endorse or promote products derived from
16967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * this software without specific prior written permission.
17967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch *
18967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch */
30967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
310617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen#ifndef WebDocumentType_h
320617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen#define WebDocumentType_h
33967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
340617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen#include "WebNode.h"
35967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
360617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen#if WEBKIT_IMPLEMENTATION
370617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsennamespace WebCore { class DocumentType; }
380617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsennamespace WTF { template <typename T> class PassRefPtr; }
390617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen#endif
40967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
410617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsennamespace WebKit {
420617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsenclass WebString;
43967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
440617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen// Provides readonly access to some properties of a DOM document type.
450617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsenclass WebDocumentType : public WebNode {
46967717af5423377c967781471ee106e2bb4e11c8Ben Murdochpublic:
470617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    WebDocumentType() { }
480617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    WebDocumentType(const WebDocumentType& e) : WebNode(e) { }
49967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
500617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    WebDocumentType& operator=(const WebDocumentType& e)
510617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    {
520617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen        WebNode::assign(e);
530617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen        return *this;
540617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    }
550617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    void assign(const WebDocumentType& e) { WebNode::assign(e); }
560617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen
570617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    WEBKIT_API WebString name() const;
58967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
590617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen#if WEBKIT_IMPLEMENTATION
600617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    WebDocumentType(const WTF::PassRefPtr<WebCore::DocumentType>&);
610617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    WebDocumentType& operator=(const WTF::PassRefPtr<WebCore::DocumentType>&);
620617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen    operator WTF::PassRefPtr<WebCore::DocumentType>() const;
630617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen#endif
640617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen};
65967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
660617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen} // namespace WebKit
67967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
680617145a89917ae7735fe1c9538688ab9a577df5Kristian Monsen#endif
69