| 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, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 484 | 484 |
| 485 void UnregisterAsObserver(ExecutionContext* context) { | 485 void UnregisterAsObserver(ExecutionContext* context) { |
| 486 DCHECK(context); | 486 DCHECK(context); |
| 487 GetNetworkStateNotifier().RemoveOnLineObserver( | 487 GetNetworkStateNotifier().RemoveOnLineObserver( |
| 488 this, TaskRunnerHelper::Get(TaskType::kNetworking, context)); | 488 this, TaskRunnerHelper::Get(TaskType::kNetworking, context)); |
| 489 } | 489 } |
| 490 | 490 |
| 491 DEFINE_INLINE_VIRTUAL_TRACE() { ContextLifecycleObserver::Trace(visitor); } | 491 DEFINE_INLINE_VIRTUAL_TRACE() { ContextLifecycleObserver::Trace(visitor); } |
| 492 }; | 492 }; |
| 493 | 493 |
| 494 Document* Document::Create(const Document& document) { |
| 495 Document* new_document = new Document( |
| 496 DocumentInit::FromContext(const_cast<Document*>(&document), BlankURL())); |
| 497 new_document->SetSecurityOrigin(document.GetSecurityOrigin()); |
| 498 new_document->SetContextFeatures(document.GetContextFeatures()); |
| 499 return new_document; |
| 500 } |
| 501 |
| 494 Document::Document(const DocumentInit& initializer, | 502 Document::Document(const DocumentInit& initializer, |
| 495 DocumentClassFlags document_classes) | 503 DocumentClassFlags document_classes) |
| 496 : ContainerNode(0, kCreateDocument), | 504 : ContainerNode(0, kCreateDocument), |
| 497 TreeScope(*this), | 505 TreeScope(*this), |
| 498 has_nodes_with_placeholder_style_(false), | 506 has_nodes_with_placeholder_style_(false), |
| 499 evaluate_media_queries_on_style_recalc_(false), | 507 evaluate_media_queries_on_style_recalc_(false), |
| 500 pending_sheet_layout_(kNoLayoutWithPendingSheets), | 508 pending_sheet_layout_(kNoLayoutWithPendingSheets), |
| 501 frame_(initializer.GetFrame()), | 509 frame_(initializer.GetFrame()), |
| 502 // TODO(dcheng): Why does this need both a LocalFrame and LocalDOMWindow | 510 // TODO(dcheng): Why does this need both a LocalFrame and LocalDOMWindow |
| 503 // pointer? | 511 // pointer? |
| (...skipping 6310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6814 } | 6822 } |
| 6815 | 6823 |
| 6816 void showLiveDocumentInstances() { | 6824 void showLiveDocumentInstances() { |
| 6817 WeakDocumentSet& set = liveDocumentSet(); | 6825 WeakDocumentSet& set = liveDocumentSet(); |
| 6818 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6826 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6819 for (blink::Document* document : set) | 6827 for (blink::Document* document : set) |
| 6820 fprintf(stderr, "- Document %p URL: %s\n", document, | 6828 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6821 document->Url().GetString().Utf8().data()); | 6829 document->Url().GetString().Utf8().data()); |
| 6822 } | 6830 } |
| 6823 #endif | 6831 #endif |
| OLD | NEW |