| 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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 TaskRunnerHelper::get(TaskType::Internal, this), | 478 TaskRunnerHelper::get(TaskType::Internal, this), |
| 479 this, | 479 this, |
| 480 &Document::elementDataCacheClearTimerFired), | 480 &Document::elementDataCacheClearTimerFired), |
| 481 m_timeline(DocumentTimeline::create(this)), | 481 m_timeline(DocumentTimeline::create(this)), |
| 482 m_compositorPendingAnimations(new CompositorPendingAnimations()), | 482 m_compositorPendingAnimations(new CompositorPendingAnimations()), |
| 483 m_templateDocumentHost(nullptr), | 483 m_templateDocumentHost(nullptr), |
| 484 m_didAssociateFormControlsTimer( | 484 m_didAssociateFormControlsTimer( |
| 485 TaskRunnerHelper::get(TaskType::Internal, this), | 485 TaskRunnerHelper::get(TaskType::Internal, this), |
| 486 this, | 486 this, |
| 487 &Document::didAssociateFormControlsTimerFired), | 487 &Document::didAssociateFormControlsTimerFired), |
| 488 m_timers(TaskRunnerHelper::get(TaskType::Timer, this)->clone()), | 488 m_timers(TaskRunnerHelper::get(TaskType::Timer, this)), |
| 489 m_hasViewportUnits(false), | 489 m_hasViewportUnits(false), |
| 490 m_parserSyncPolicy(AllowAsynchronousParsing), | 490 m_parserSyncPolicy(AllowAsynchronousParsing), |
| 491 m_nodeCount(0), | 491 m_nodeCount(0), |
| 492 m_wouldLoadReason(Created), | 492 m_wouldLoadReason(Created), |
| 493 m_passwordCount(0) { | 493 m_passwordCount(0) { |
| 494 if (m_frame) { | 494 if (m_frame) { |
| 495 DCHECK(m_frame->page()); | 495 DCHECK(m_frame->page()); |
| 496 provideContextFeaturesToDocumentFrom(*this, *m_frame->page()); | 496 provideContextFeaturesToDocumentFrom(*this, *m_frame->page()); |
| 497 | 497 |
| 498 m_fetcher = m_frame->loader().documentLoader()->fetcher(); | 498 m_fetcher = m_frame->loader().documentLoader()->fetcher(); |
| (...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2481 if (!loader()) | 2481 if (!loader()) |
| 2482 m_fetcher->clearContext(); | 2482 m_fetcher->clearContext(); |
| 2483 // If this document is the master for an HTMLImportsController, sever that | 2483 // If this document is the master for an HTMLImportsController, sever that |
| 2484 // relationship. This ensures that we don't leave import loads in flight, | 2484 // relationship. This ensures that we don't leave import loads in flight, |
| 2485 // thinking they should have access to a valid frame when they don't. | 2485 // thinking they should have access to a valid frame when they don't. |
| 2486 if (m_importsController) { | 2486 if (m_importsController) { |
| 2487 m_importsController->dispose(); | 2487 m_importsController->dispose(); |
| 2488 clearImportsController(); | 2488 clearImportsController(); |
| 2489 } | 2489 } |
| 2490 | 2490 |
| 2491 m_timers.setTimerTaskRunner(Platform::current() | 2491 m_timers.setTimerTaskRunner( |
| 2492 ->currentThread() | 2492 Platform::current()->currentThread()->scheduler()->timerTaskRunner()); |
| 2493 ->scheduler() | |
| 2494 ->timerTaskRunner() | |
| 2495 ->clone()); | |
| 2496 | 2493 |
| 2497 if (m_mediaQueryMatcher) | 2494 if (m_mediaQueryMatcher) |
| 2498 m_mediaQueryMatcher->documentDetached(); | 2495 m_mediaQueryMatcher->documentDetached(); |
| 2499 | 2496 |
| 2500 m_lifecycle.advanceTo(DocumentLifecycle::Stopped); | 2497 m_lifecycle.advanceTo(DocumentLifecycle::Stopped); |
| 2501 | 2498 |
| 2502 // TODO(haraken): Call contextDestroyed() before we start any disruptive | 2499 // TODO(haraken): Call contextDestroyed() before we start any disruptive |
| 2503 // operations. | 2500 // operations. |
| 2504 // TODO(haraken): Currently we call notifyContextDestroyed() only in | 2501 // TODO(haraken): Currently we call notifyContextDestroyed() only in |
| 2505 // Document::detachLayoutTree(), which means that we don't call | 2502 // Document::detachLayoutTree(), which means that we don't call |
| (...skipping 4076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6582 } | 6579 } |
| 6583 | 6580 |
| 6584 void showLiveDocumentInstances() { | 6581 void showLiveDocumentInstances() { |
| 6585 WeakDocumentSet& set = liveDocumentSet(); | 6582 WeakDocumentSet& set = liveDocumentSet(); |
| 6586 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6583 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6587 for (Document* document : set) | 6584 for (Document* document : set) |
| 6588 fprintf(stderr, "- Document %p URL: %s\n", document, | 6585 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6589 document->url().getString().utf8().data()); | 6586 document->url().getString().utf8().data()); |
| 6590 } | 6587 } |
| 6591 #endif | 6588 #endif |
| OLD | NEW |