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 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2403 // TODO(haraken): Call contextDestroyed() before we start any disruptive | 2403 // TODO(haraken): Call contextDestroyed() before we start any disruptive |
2404 // operations. | 2404 // operations. |
2405 // TODO(haraken): Currently we call notifyContextDestroyed() only in | 2405 // TODO(haraken): Currently we call notifyContextDestroyed() only in |
2406 // Document::detachLayoutTree(), which means that we don't call | 2406 // Document::detachLayoutTree(), which means that we don't call |
2407 // notifyContextDestroyed() for a document that doesn't get detached. | 2407 // notifyContextDestroyed() for a document that doesn't get detached. |
2408 // If such a document has any observer, the observer won't get | 2408 // If such a document has any observer, the observer won't get |
2409 // a contextDestroyed() notification. This can happen for a document | 2409 // a contextDestroyed() notification. This can happen for a document |
2410 // created by DOMImplementation::createDocument(). | 2410 // created by DOMImplementation::createDocument(). |
2411 ExecutionContext::notifyContextDestroyed(); | 2411 ExecutionContext::notifyContextDestroyed(); |
2412 | 2412 |
2413 // This is required, as our LocalFrame might delete itself as soon as it detac
hes | 2413 // This is required, as our LocalFrame might delete itself as soon as it |
2414 // us. However, this violates Node::detachLayoutTree() semantics, as it's neve
r | 2414 // detaches us. However, this violates Node::detachLayoutTree() semantics, as |
2415 // possible to re-attach. Eventually Document::detachLayoutTree() should be re
named, | 2415 // it's never possible to re-attach. Eventually Document::detachLayoutTree() |
2416 // or this setting of the frame to 0 could be made explicit in each of the | 2416 // should be renamed, or this setting of the frame to 0 could be made |
2417 // callers of Document::detachLayoutTree(). | 2417 // explicit in each of the callers of Document::detachLayoutTree(). |
2418 m_frame = nullptr; | 2418 m_frame = nullptr; |
2419 } | 2419 } |
2420 | 2420 |
2421 void Document::removeAllEventListeners() { | 2421 void Document::removeAllEventListeners() { |
2422 ContainerNode::removeAllEventListeners(); | 2422 ContainerNode::removeAllEventListeners(); |
2423 | 2423 |
2424 if (LocalDOMWindow* domWindow = this->domWindow()) | 2424 if (LocalDOMWindow* domWindow = this->domWindow()) |
2425 domWindow->removeAllEventListeners(); | 2425 domWindow->removeAllEventListeners(); |
2426 } | 2426 } |
2427 | 2427 |
(...skipping 3960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6388 } | 6388 } |
6389 | 6389 |
6390 void showLiveDocumentInstances() { | 6390 void showLiveDocumentInstances() { |
6391 WeakDocumentSet& set = liveDocumentSet(); | 6391 WeakDocumentSet& set = liveDocumentSet(); |
6392 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6392 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6393 for (Document* document : set) | 6393 for (Document* document : set) |
6394 fprintf(stderr, "- Document %p URL: %s\n", document, | 6394 fprintf(stderr, "- Document %p URL: %s\n", document, |
6395 document->url().getString().utf8().data()); | 6395 document->url().getString().utf8().data()); |
6396 } | 6396 } |
6397 #endif | 6397 #endif |
OLD | NEW |