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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 void setAlinkColor(const String&); | 57 void setAlinkColor(const String&); |
58 String linkColor(); | 58 String linkColor(); |
59 void setLinkColor(const String&); | 59 void setLinkColor(const String&); |
60 String vlinkColor(); | 60 String vlinkColor(); |
61 void setVlinkColor(const String&); | 61 void setVlinkColor(const String&); |
62 | 62 |
63 void clear(); | 63 void clear(); |
64 | 64 |
65 void addNamedItem(const AtomicString& name); | 65 void addNamedItem(const AtomicString& name); |
66 void removeNamedItem(const AtomicString& name); | 66 void removeNamedItem(const AtomicString& name); |
67 bool hasNamedItem(AtomicStringImpl* name); | 67 bool hasNamedItem(StringImpl* name); |
68 | 68 |
69 void addExtraNamedItem(const AtomicString& name); | 69 void addExtraNamedItem(const AtomicString& name); |
70 void removeExtraNamedItem(const AtomicString& name); | 70 void removeExtraNamedItem(const AtomicString& name); |
71 bool hasExtraNamedItem(AtomicStringImpl* name); | 71 bool hasExtraNamedItem(StringImpl* name); |
72 | 72 |
73 static bool isCaseSensitiveAttribute(const QualifiedName&); | 73 static bool isCaseSensitiveAttribute(const QualifiedName&); |
74 | 74 |
75 protected: | 75 protected: |
76 HTMLDocument(Frame*, const KURL&, DocumentClassFlags extendedDocumentClasses
= DefaultDocumentClass); | 76 HTMLDocument(Frame*, const KURL&, DocumentClassFlags extendedDocumentClasses
= DefaultDocumentClass); |
77 | 77 |
78 private: | 78 private: |
79 void addItemToMap(HashCountedSet<AtomicStringImpl*>&, const AtomicString&); | 79 void addItemToMap(HashCountedSet<StringImpl*>&, const AtomicString&); |
80 void removeItemFromMap(HashCountedSet<AtomicStringImpl*>&, const AtomicStrin
g&); | 80 void removeItemFromMap(HashCountedSet<StringImpl*>&, const AtomicString&); |
81 | 81 |
82 HashCountedSet<AtomicStringImpl*> m_namedItemCounts; | 82 HashCountedSet<StringImpl*> m_namedItemCounts; |
83 HashCountedSet<AtomicStringImpl*> m_extraNamedItemCounts; | 83 HashCountedSet<StringImpl*> m_extraNamedItemCounts; |
84 }; | 84 }; |
85 | 85 |
86 inline bool HTMLDocument::hasNamedItem(AtomicStringImpl* name) | 86 inline bool HTMLDocument::hasNamedItem(StringImpl* name) |
87 { | 87 { |
88 ASSERT(name); | 88 ASSERT(name); |
89 return m_namedItemCounts.contains(name); | 89 return m_namedItemCounts.contains(name); |
90 } | 90 } |
91 | 91 |
92 inline bool HTMLDocument::hasExtraNamedItem(AtomicStringImpl* name) | 92 inline bool HTMLDocument::hasExtraNamedItem(StringImpl* name) |
93 { | 93 { |
94 ASSERT(name); | 94 ASSERT(name); |
95 return m_extraNamedItemCounts.contains(name); | 95 return m_extraNamedItemCounts.contains(name); |
96 } | 96 } |
97 | 97 |
98 inline HTMLDocument* toHTMLDocument(Document* document) | 98 inline HTMLDocument* toHTMLDocument(Document* document) |
99 { | 99 { |
100 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); | 100 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); |
101 return static_cast<HTMLDocument*>(document); | 101 return static_cast<HTMLDocument*>(document); |
102 } | 102 } |
103 | 103 |
104 inline const HTMLDocument* toHTMLDocument(const Document* document) | 104 inline const HTMLDocument* toHTMLDocument(const Document* document) |
105 { | 105 { |
106 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); | 106 ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument()); |
107 return static_cast<const HTMLDocument*>(document); | 107 return static_cast<const HTMLDocument*>(document); |
108 } | 108 } |
109 | 109 |
110 // This will catch anyone doing an unnecessary cast. | 110 // This will catch anyone doing an unnecessary cast. |
111 void toHTMLDocument(const HTMLDocument*); | 111 void toHTMLDocument(const HTMLDocument*); |
112 | 112 |
113 } // namespace WebCore | 113 } // namespace WebCore |
114 | 114 |
115 #endif // HTMLDocument_h | 115 #endif // HTMLDocument_h |
OLD | NEW |