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 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
9 * Copyright (C) 2011 Google Inc. All rights reserved. | 9 * Copyright (C) 2011 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 typedef HashCountedSet<Node*> TouchEventTargetSet; | 199 typedef HashCountedSet<Node*> TouchEventTargetSet; |
200 | 200 |
201 enum DocumentClass { | 201 enum DocumentClass { |
202 DefaultDocumentClass = 0, | 202 DefaultDocumentClass = 0, |
203 HTMLDocumentClass = 1, | 203 HTMLDocumentClass = 1, |
204 XHTMLDocumentClass = 1 << 1, | 204 XHTMLDocumentClass = 1 << 1, |
205 ImageDocumentClass = 1 << 2, | 205 ImageDocumentClass = 1 << 2, |
206 PluginDocumentClass = 1 << 3, | 206 PluginDocumentClass = 1 << 3, |
207 MediaDocumentClass = 1 << 4, | 207 MediaDocumentClass = 1 << 4, |
208 SVGDocumentClass = 1 << 5, | 208 SVGDocumentClass = 1 << 5, |
| 209 XMLDocumentClass = 1 << 6, |
209 }; | 210 }; |
210 | 211 |
211 typedef unsigned char DocumentClassFlags; | 212 typedef unsigned char DocumentClassFlags; |
212 | 213 |
213 class Document : public ContainerNode, public TreeScope, public SecurityContext,
public ExecutionContext, public ExecutionContextClient | 214 class Document : public ContainerNode, public TreeScope, public SecurityContext,
public ExecutionContext, public ExecutionContextClient |
214 , public DocumentSupplementable, public LifecycleContext<Document> { | 215 , public DocumentSupplementable, public LifecycleContext<Document> { |
215 public: | 216 public: |
216 static PassRefPtr<Document> create(const DocumentInit& initializer = Documen
tInit()) | 217 static PassRefPtr<Document> create(const DocumentInit& initializer = Documen
tInit()) |
217 { | 218 { |
218 return adoptRef(new Document(initializer)); | 219 return adoptRef(new Document(initializer)); |
219 } | 220 } |
220 static PassRefPtr<Document> createXHTML(const DocumentInit& initializer = Do
cumentInit()) | |
221 { | |
222 return adoptRef(new Document(initializer, XHTMLDocumentClass)); | |
223 } | |
224 virtual ~Document(); | 221 virtual ~Document(); |
225 | 222 |
226 MediaQueryMatcher& mediaQueryMatcher(); | 223 MediaQueryMatcher& mediaQueryMatcher(); |
227 | 224 |
228 void mediaQueryAffectingValueChanged(); | 225 void mediaQueryAffectingValueChanged(); |
229 | 226 |
230 using ContainerNode::ref; | 227 using ContainerNode::ref; |
231 using ContainerNode::deref; | 228 using ContainerNode::deref; |
232 using SecurityContext::securityOrigin; | 229 using SecurityContext::securityOrigin; |
233 using SecurityContext::contentSecurityPolicy; | 230 using SecurityContext::contentSecurityPolicy; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 PassRefPtr<HTMLCollection> anchors(); | 369 PassRefPtr<HTMLCollection> anchors(); |
373 PassRefPtr<HTMLCollection> scripts(); | 370 PassRefPtr<HTMLCollection> scripts(); |
374 PassRefPtr<HTMLCollection> allForBinding(); | 371 PassRefPtr<HTMLCollection> allForBinding(); |
375 PassRefPtr<HTMLCollection> all(); | 372 PassRefPtr<HTMLCollection> all(); |
376 | 373 |
377 PassRefPtr<HTMLCollection> windowNamedItems(const AtomicString& name); | 374 PassRefPtr<HTMLCollection> windowNamedItems(const AtomicString& name); |
378 PassRefPtr<HTMLCollection> documentNamedItems(const AtomicString& name); | 375 PassRefPtr<HTMLCollection> documentNamedItems(const AtomicString& name); |
379 | 376 |
380 bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass;
} | 377 bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass;
} |
381 bool isXHTMLDocument() const { return m_documentClasses & XHTMLDocumentClass
; } | 378 bool isXHTMLDocument() const { return m_documentClasses & XHTMLDocumentClass
; } |
| 379 bool isXMLDocument() const { return m_documentClasses & XMLDocumentClass; } |
382 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass
; } | 380 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass
; } |
383 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } | 381 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } |
384 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla
ss; } | 382 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla
ss; } |
385 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass
; } | 383 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass
; } |
386 | 384 |
387 bool hasSVGRootNode() const; | 385 bool hasSVGRootNode() const; |
388 | 386 |
389 bool isFrameSet() const; | 387 bool isFrameSet() const; |
390 | 388 |
391 bool isSrcdocDocument() const { return m_isSrcdocDocument; } | 389 bool isSrcdocDocument() const { return m_isSrcdocDocument; } |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 inline bool Node::isDocumentNode() const | 1352 inline bool Node::isDocumentNode() const |
1355 { | 1353 { |
1356 return this == document(); | 1354 return this == document(); |
1357 } | 1355 } |
1358 | 1356 |
1359 Node* eventTargetNodeForDocument(Document*); | 1357 Node* eventTargetNodeForDocument(Document*); |
1360 | 1358 |
1361 } // namespace WebCore | 1359 } // namespace WebCore |
1362 | 1360 |
1363 #endif // Document_h | 1361 #endif // Document_h |
OLD | NEW |