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

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

Issue 1043903003: rAF: Introduce FrameRequestCallbackCollection for managing rAF callbacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 5 years, 8 months 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 | Annotate | Revision Log
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 r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "core/dom/DocumentFragment.h" 68 #include "core/dom/DocumentFragment.h"
69 #include "core/dom/DocumentLifecycleObserver.h" 69 #include "core/dom/DocumentLifecycleObserver.h"
70 #include "core/dom/DocumentMarkerController.h" 70 #include "core/dom/DocumentMarkerController.h"
71 #include "core/dom/DocumentType.h" 71 #include "core/dom/DocumentType.h"
72 #include "core/dom/Element.h" 72 #include "core/dom/Element.h"
73 #include "core/dom/ElementDataCache.h" 73 #include "core/dom/ElementDataCache.h"
74 #include "core/dom/ElementRegistrationOptions.h" 74 #include "core/dom/ElementRegistrationOptions.h"
75 #include "core/dom/ElementTraversal.h" 75 #include "core/dom/ElementTraversal.h"
76 #include "core/dom/ExceptionCode.h" 76 #include "core/dom/ExceptionCode.h"
77 #include "core/dom/ExecutionContextTask.h" 77 #include "core/dom/ExecutionContextTask.h"
78 #include "core/dom/FrameRequestCallback.h"
78 #include "core/dom/MainThreadTaskRunner.h" 79 #include "core/dom/MainThreadTaskRunner.h"
79 #include "core/dom/Microtask.h" 80 #include "core/dom/Microtask.h"
80 #include "core/dom/MutationObserver.h" 81 #include "core/dom/MutationObserver.h"
81 #include "core/dom/NodeChildRemovalTracker.h" 82 #include "core/dom/NodeChildRemovalTracker.h"
82 #include "core/dom/NodeFilter.h" 83 #include "core/dom/NodeFilter.h"
83 #include "core/dom/NodeIterator.h" 84 #include "core/dom/NodeIterator.h"
84 #include "core/dom/NodeLayoutStyle.h" 85 #include "core/dom/NodeLayoutStyle.h"
85 #include "core/dom/NodeRareData.h" 86 #include "core/dom/NodeRareData.h"
86 #include "core/dom/NodeRenderingTraversal.h" 87 #include "core/dom/NodeRenderingTraversal.h"
87 #include "core/dom/NodeTraversal.h" 88 #include "core/dom/NodeTraversal.h"
88 #include "core/dom/NodeWithIndex.h" 89 #include "core/dom/NodeWithIndex.h"
89 #include "core/dom/ProcessingInstruction.h" 90 #include "core/dom/ProcessingInstruction.h"
90 #include "core/dom/RequestAnimationFrameCallback.h"
91 #include "core/dom/ScriptRunner.h" 91 #include "core/dom/ScriptRunner.h"
92 #include "core/dom/ScriptedAnimationController.h" 92 #include "core/dom/ScriptedAnimationController.h"
93 #include "core/dom/SelectorQuery.h" 93 #include "core/dom/SelectorQuery.h"
94 #include "core/dom/StaticNodeList.h" 94 #include "core/dom/StaticNodeList.h"
95 #include "core/dom/StyleEngine.h" 95 #include "core/dom/StyleEngine.h"
96 #include "core/dom/TouchList.h" 96 #include "core/dom/TouchList.h"
97 #include "core/dom/TransformSource.h" 97 #include "core/dom/TransformSource.h"
98 #include "core/dom/TreeWalker.h" 98 #include "core/dom/TreeWalker.h"
99 #include "core/dom/VisitedLinkState.h" 99 #include "core/dom/VisitedLinkState.h"
100 #include "core/dom/XMLDocument.h" 100 #include "core/dom/XMLDocument.h"
(...skipping 4970 matching lines...) Expand 10 before | Expand all | Expand 10 after
5071 { 5071 {
5072 if (!m_scriptedAnimationController) { 5072 if (!m_scriptedAnimationController) {
5073 m_scriptedAnimationController = ScriptedAnimationController::create(this ); 5073 m_scriptedAnimationController = ScriptedAnimationController::create(this );
5074 // We need to make sure that we don't start up the animation controller on a background tab, for example. 5074 // We need to make sure that we don't start up the animation controller on a background tab, for example.
5075 if (!page()) 5075 if (!page())
5076 m_scriptedAnimationController->suspend(); 5076 m_scriptedAnimationController->suspend();
5077 } 5077 }
5078 return *m_scriptedAnimationController; 5078 return *m_scriptedAnimationController;
5079 } 5079 }
5080 5080
5081 int Document::requestAnimationFrame(RequestAnimationFrameCallback* callback) 5081 int Document::requestAnimationFrame(FrameRequestCallback* callback)
5082 { 5082 {
5083 return ensureScriptedAnimationController().registerCallback(callback); 5083 return ensureScriptedAnimationController().registerCallback(callback);
5084 } 5084 }
5085 5085
5086 void Document::cancelAnimationFrame(int id) 5086 void Document::cancelAnimationFrame(int id)
5087 { 5087 {
5088 if (!m_scriptedAnimationController) 5088 if (!m_scriptedAnimationController)
5089 return; 5089 return;
5090 m_scriptedAnimationController->cancelCallback(id); 5090 m_scriptedAnimationController->cancelCallback(id);
5091 } 5091 }
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
5726 #ifndef NDEBUG 5726 #ifndef NDEBUG
5727 using namespace blink; 5727 using namespace blink;
5728 void showLiveDocumentInstances() 5728 void showLiveDocumentInstances()
5729 { 5729 {
5730 WeakDocumentSet& set = liveDocumentSet(); 5730 WeakDocumentSet& set = liveDocumentSet();
5731 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 5731 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
5732 for (Document* document : set) 5732 for (Document* document : set)
5733 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data()); 5733 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str ing().utf8().data());
5734 } 5734 }
5735 #endif 5735 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698