| 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 PassRefPtr<HTMLCollection> anchors(); | 373 PassRefPtr<HTMLCollection> anchors(); |
| 377 PassRefPtr<HTMLCollection> scripts(); | 374 PassRefPtr<HTMLCollection> scripts(); |
| 378 PassRefPtr<HTMLCollection> allForBinding(); | 375 PassRefPtr<HTMLCollection> allForBinding(); |
| 379 PassRefPtr<HTMLCollection> all(); | 376 PassRefPtr<HTMLCollection> all(); |
| 380 | 377 |
| 381 PassRefPtr<HTMLCollection> windowNamedItems(const AtomicString& name); | 378 PassRefPtr<HTMLCollection> windowNamedItems(const AtomicString& name); |
| 382 PassRefPtr<HTMLCollection> documentNamedItems(const AtomicString& name); | 379 PassRefPtr<HTMLCollection> documentNamedItems(const AtomicString& name); |
| 383 | 380 |
| 384 bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass;
} | 381 bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass;
} |
| 385 bool isXHTMLDocument() const { return m_documentClasses & XHTMLDocumentClass
; } | 382 bool isXHTMLDocument() const { return m_documentClasses & XHTMLDocumentClass
; } |
| 383 bool isXMLDocument() const { return m_documentClasses & XMLDocumentClass; } |
| 386 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass
; } | 384 bool isImageDocument() const { return m_documentClasses & ImageDocumentClass
; } |
| 387 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } | 385 bool isSVGDocument() const { return m_documentClasses & SVGDocumentClass; } |
| 388 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla
ss; } | 386 bool isPluginDocument() const { return m_documentClasses & PluginDocumentCla
ss; } |
| 389 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass
; } | 387 bool isMediaDocument() const { return m_documentClasses & MediaDocumentClass
; } |
| 390 | 388 |
| 391 bool hasSVGRootNode() const; | 389 bool hasSVGRootNode() const; |
| 392 | 390 |
| 393 bool isFrameSet() const; | 391 bool isFrameSet() const; |
| 394 | 392 |
| 395 bool isSrcdocDocument() const { return m_isSrcdocDocument; } | 393 bool isSrcdocDocument() const { return m_isSrcdocDocument; } |
| (...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1357 inline bool Node::isDocumentNode() const | 1355 inline bool Node::isDocumentNode() const |
| 1358 { | 1356 { |
| 1359 return this == document(); | 1357 return this == document(); |
| 1360 } | 1358 } |
| 1361 | 1359 |
| 1362 Node* eventTargetNodeForDocument(Document*); | 1360 Node* eventTargetNodeForDocument(Document*); |
| 1363 | 1361 |
| 1364 } // namespace WebCore | 1362 } // namespace WebCore |
| 1365 | 1363 |
| 1366 #endif // Document_h | 1364 #endif // Document_h |
| OLD | NEW |