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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2524273002: Move ExecutionContext's task suspension from FrameLoader to Page
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5697 matching lines...) Expand 10 before | Expand all | Expand 10 after
5708 m_taskRunner->postInspectorTask(location, std::move(task)); 5708 m_taskRunner->postInspectorTask(location, std::move(task));
5709 } 5709 }
5710 5710
5711 void Document::tasksWereSuspended() { 5711 void Document::tasksWereSuspended() {
5712 scriptRunner()->suspend(); 5712 scriptRunner()->suspend();
5713 5713
5714 if (m_parser) 5714 if (m_parser)
5715 m_parser->suspendScheduledTasks(); 5715 m_parser->suspendScheduledTasks();
5716 if (m_scriptedAnimationController) 5716 if (m_scriptedAnimationController)
5717 m_scriptedAnimationController->suspend(); 5717 m_scriptedAnimationController->suspend();
5718 fetcher()->setDefersLoading(true);
5718 } 5719 }
5719 5720
5720 void Document::tasksWereResumed() { 5721 void Document::tasksWereResumed() {
5721 scriptRunner()->resume(); 5722 scriptRunner()->resume();
5722 5723
5723 if (m_parser) 5724 if (m_parser)
5724 m_parser->resumeScheduledTasks(); 5725 m_parser->resumeScheduledTasks();
5725 if (m_scriptedAnimationController) 5726 if (m_scriptedAnimationController)
5726 m_scriptedAnimationController->resume(); 5727 m_scriptedAnimationController->resume();
5728 fetcher()->setDefersLoading(false);
5727 5729
5728 MutationObserver::resumeSuspendedObservers(); 5730 MutationObserver::resumeSuspendedObservers();
5729 if (m_domWindow) 5731 if (m_domWindow)
5730 DOMWindowPerformance::performance(*m_domWindow)->resumeSuspendedObservers(); 5732 DOMWindowPerformance::performance(*m_domWindow)->resumeSuspendedObservers();
5731 } 5733 }
5732 5734
5733 // FIXME: suspendScheduledTasks(), resumeScheduledTasks(), tasksNeedSuspension() 5735 // FIXME: suspendScheduledTasks(), resumeScheduledTasks(), tasksNeedSuspension()
5734 // should be moved to LocalDOMWindow once it inherits ExecutionContext 5736 // should be moved to LocalDOMWindow once it inherits ExecutionContext
5735 void Document::suspendScheduledTasks() { 5737 void Document::suspendScheduledTasks() {
5736 ExecutionContext::suspendScheduledTasks(); 5738 ExecutionContext::suspendScheduledTasks();
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
6542 } 6544 }
6543 6545
6544 void showLiveDocumentInstances() { 6546 void showLiveDocumentInstances() {
6545 WeakDocumentSet& set = liveDocumentSet(); 6547 WeakDocumentSet& set = liveDocumentSet();
6546 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6548 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6547 for (Document* document : set) 6549 for (Document* document : set)
6548 fprintf(stderr, "- Document %p URL: %s\n", document, 6550 fprintf(stderr, "- Document %p URL: %s\n", document,
6549 document->url().getString().utf8().data()); 6551 document->url().getString().utf8().data());
6550 } 6552 }
6551 #endif 6553 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698