| 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 2621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2632 cache->Remove(&node); | 2632 cache->Remove(&node); |
| 2633 } | 2633 } |
| 2634 } | 2634 } |
| 2635 } | 2635 } |
| 2636 | 2636 |
| 2637 GetStyleEngine().DidDetach(); | 2637 GetStyleEngine().DidDetach(); |
| 2638 | 2638 |
| 2639 GetPage()->GetEventHandlerRegistry().DocumentDetached(*this); | 2639 GetPage()->GetEventHandlerRegistry().DocumentDetached(*this); |
| 2640 | 2640 |
| 2641 // Signal destruction to mutation observers. | 2641 // Signal destruction to mutation observers. |
| 2642 DocumentShutdownNotifier::NotifyContextDestroyed(); |
| 2642 SynchronousMutationNotifier::NotifyContextDestroyed(); | 2643 SynchronousMutationNotifier::NotifyContextDestroyed(); |
| 2643 | 2644 |
| 2644 // If this Document is associated with a live DocumentLoader, the | 2645 // If this Document is associated with a live DocumentLoader, the |
| 2645 // DocumentLoader will take care of clearing the FetchContext. Deferring | 2646 // DocumentLoader will take care of clearing the FetchContext. Deferring |
| 2646 // to the DocumentLoader when possible also prevents prematurely clearing | 2647 // to the DocumentLoader when possible also prevents prematurely clearing |
| 2647 // the context in the case where multiple Documents end up associated with | 2648 // the context in the case where multiple Documents end up associated with |
| 2648 // a single DocumentLoader (e.g., navigating to a javascript: url). | 2649 // a single DocumentLoader (e.g., navigating to a javascript: url). |
| 2649 if (!Loader()) | 2650 if (!Loader()) |
| 2650 fetcher_->ClearContext(); | 2651 fetcher_->ClearContext(); |
| 2651 // If this document is the master for an HTMLImportsController, sever that | 2652 // If this document is the master for an HTMLImportsController, sever that |
| (...skipping 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6851 visitor->Trace(intersection_observer_controller_); | 6852 visitor->Trace(intersection_observer_controller_); |
| 6852 visitor->Trace(snap_coordinator_); | 6853 visitor->Trace(snap_coordinator_); |
| 6853 visitor->Trace(resize_observer_controller_); | 6854 visitor->Trace(resize_observer_controller_); |
| 6854 visitor->Trace(property_registry_); | 6855 visitor->Trace(property_registry_); |
| 6855 visitor->Trace(network_state_observer_); | 6856 visitor->Trace(network_state_observer_); |
| 6856 Supplementable<Document>::Trace(visitor); | 6857 Supplementable<Document>::Trace(visitor); |
| 6857 TreeScope::Trace(visitor); | 6858 TreeScope::Trace(visitor); |
| 6858 ContainerNode::Trace(visitor); | 6859 ContainerNode::Trace(visitor); |
| 6859 ExecutionContext::Trace(visitor); | 6860 ExecutionContext::Trace(visitor); |
| 6860 SecurityContext::Trace(visitor); | 6861 SecurityContext::Trace(visitor); |
| 6862 DocumentShutdownNotifier::Trace(visitor); |
| 6861 SynchronousMutationNotifier::Trace(visitor); | 6863 SynchronousMutationNotifier::Trace(visitor); |
| 6862 } | 6864 } |
| 6863 | 6865 |
| 6864 void Document::RecordDeferredLoadReason(WouldLoadReason reason) { | 6866 void Document::RecordDeferredLoadReason(WouldLoadReason reason) { |
| 6865 DCHECK(would_load_reason_ == WouldLoadReason::kInvalid || | 6867 DCHECK(would_load_reason_ == WouldLoadReason::kInvalid || |
| 6866 reason != WouldLoadReason::kCreated); | 6868 reason != WouldLoadReason::kCreated); |
| 6867 DCHECK(reason != WouldLoadReason::kInvalid); | 6869 DCHECK(reason != WouldLoadReason::kInvalid); |
| 6868 DCHECK(GetFrame()); | 6870 DCHECK(GetFrame()); |
| 6869 DCHECK(GetFrame()->IsCrossOriginSubframe()); | 6871 DCHECK(GetFrame()->IsCrossOriginSubframe()); |
| 6870 if (reason <= would_load_reason_ || | 6872 if (reason <= would_load_reason_ || |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6903 } | 6905 } |
| 6904 | 6906 |
| 6905 void showLiveDocumentInstances() { | 6907 void showLiveDocumentInstances() { |
| 6906 WeakDocumentSet& set = liveDocumentSet(); | 6908 WeakDocumentSet& set = liveDocumentSet(); |
| 6907 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6909 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6908 for (blink::Document* document : set) | 6910 for (blink::Document* document : set) |
| 6909 fprintf(stderr, "- Document %p URL: %s\n", document, | 6911 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6910 document->Url().GetString().Utf8().data()); | 6912 document->Url().GetString().Utf8().data()); |
| 6911 } | 6913 } |
| 6912 #endif | 6914 #endif |
| OLD | NEW |