Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2881323002: Support Document constructor. (Closed)
Patch Set: add svg/xml tests Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Document.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index ecf025f9b8bbdf102ff34cfc044e347942b63755..514a832b90614041ea0a521861f65327b14eb1f5 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -491,6 +491,14 @@ class Document::NetworkStateObserver final
DEFINE_INLINE_VIRTUAL_TRACE() { ContextLifecycleObserver::Trace(visitor); }
};
+Document* Document::Create(const Document& document) {
+ Document* new_document = new Document(
+ DocumentInit::FromContext(const_cast<Document*>(&document), BlankURL()));
+ new_document->SetSecurityOrigin(document.GetSecurityOrigin());
+ new_document->SetContextFeatures(document.GetContextFeatures());
+ return new_document;
+}
+
Document::Document(const DocumentInit& initializer,
DocumentClassFlags document_classes)
: ContainerNode(0, kCreateDocument),
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698