| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "wtf/HashCountedSet.h" | 28 #include "wtf/HashCountedSet.h" |
| 29 | 29 |
| 30 namespace WebCore { | 30 namespace WebCore { |
| 31 | 31 |
| 32 class FrameView; | 32 class FrameView; |
| 33 class HTMLBodyElement; | 33 class HTMLBodyElement; |
| 34 class HTMLElement; | 34 class HTMLElement; |
| 35 | 35 |
| 36 class HTMLDocument : public Document, public CachedResourceClient { | 36 class HTMLDocument : public Document, public CachedResourceClient { |
| 37 public: | 37 public: |
| 38 static PassRefPtr<HTMLDocument> create(Frame* frame, const KURL& url) | 38 static PassRefPtr<HTMLDocument> create(const DocumentInitializer& initialize
r = DocumentInitializer()) |
| 39 { | 39 { |
| 40 return adoptRef(new HTMLDocument(frame, url)); | 40 return adoptRef(new HTMLDocument(initializer)); |
| 41 } | 41 } |
| 42 virtual ~HTMLDocument(); | 42 virtual ~HTMLDocument(); |
| 43 | 43 |
| 44 String dir(); | 44 String dir(); |
| 45 void setDir(const String&); | 45 void setDir(const String&); |
| 46 | 46 |
| 47 String designMode() const; | 47 String designMode() const; |
| 48 void setDesignMode(const String&); | 48 void setDesignMode(const String&); |
| 49 | 49 |
| 50 Element* activeElement(); | 50 Element* activeElement(); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 67 void removeNamedItem(const AtomicString& name); | 67 void removeNamedItem(const AtomicString& name); |
| 68 bool hasNamedItem(AtomicStringImpl* name); | 68 bool hasNamedItem(AtomicStringImpl* name); |
| 69 | 69 |
| 70 void addExtraNamedItem(const AtomicString& name); | 70 void addExtraNamedItem(const AtomicString& name); |
| 71 void removeExtraNamedItem(const AtomicString& name); | 71 void removeExtraNamedItem(const AtomicString& name); |
| 72 bool hasExtraNamedItem(AtomicStringImpl* name); | 72 bool hasExtraNamedItem(AtomicStringImpl* name); |
| 73 | 73 |
| 74 static bool isCaseSensitiveAttribute(const QualifiedName&); | 74 static bool isCaseSensitiveAttribute(const QualifiedName&); |
| 75 | 75 |
| 76 protected: | 76 protected: |
| 77 HTMLDocument(Frame*, const KURL&, DocumentClassFlags extendedDocumentClasses
= DefaultDocumentClass); | 77 HTMLDocument(const DocumentInitializer&, DocumentClassFlags extendedDocument
Classes = DefaultDocumentClass); |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 HTMLBodyElement* bodyAsHTMLBodyElement() const; | 80 HTMLBodyElement* bodyAsHTMLBodyElement() const; |
| 81 void addItemToMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&); | 81 void addItemToMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&); |
| 82 void removeItemFromMap(HashCountedSet<AtomicStringImpl*>&, const AtomicStrin
g&); | 82 void removeItemFromMap(HashCountedSet<AtomicStringImpl*>&, const AtomicStrin
g&); |
| 83 | 83 |
| 84 HashCountedSet<AtomicStringImpl*> m_namedItemCounts; | 84 HashCountedSet<AtomicStringImpl*> m_namedItemCounts; |
| 85 HashCountedSet<AtomicStringImpl*> m_extraNamedItemCounts; | 85 HashCountedSet<AtomicStringImpl*> m_extraNamedItemCounts; |
| 86 }; | 86 }; |
| 87 | 87 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 108 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); | 108 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); |
| 109 return static_cast<const HTMLDocument*>(document); | 109 return static_cast<const HTMLDocument*>(document); |
| 110 } | 110 } |
| 111 | 111 |
| 112 // This will catch anyone doing an unnecessary cast. | 112 // This will catch anyone doing an unnecessary cast. |
| 113 void toHTMLDocument(const HTMLDocument*); | 113 void toHTMLDocument(const HTMLDocument*); |
| 114 | 114 |
| 115 } // namespace WebCore | 115 } // namespace WebCore |
| 116 | 116 |
| 117 #endif // HTMLDocument_h | 117 #endif // HTMLDocument_h |
| OLD | NEW |