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

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

Issue 2536643002: Introduce animation frame tasks (Closed)
Patch Set: tweak behavior, write tests 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
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 4258 matching lines...) Expand 10 before | Expand all | Expand 10 after
4269 return 0; 4269 return 0;
4270 return domWindow->getAttributeEventListener(eventType); 4270 return domWindow->getAttributeEventListener(eventType);
4271 } 4271 }
4272 4272
4273 EventQueue* Document::getEventQueue() const { 4273 EventQueue* Document::getEventQueue() const {
4274 if (!m_domWindow) 4274 if (!m_domWindow)
4275 return 0; 4275 return 0;
4276 return m_domWindow->getEventQueue(); 4276 return m_domWindow->getEventQueue();
4277 } 4277 }
4278 4278
4279 void Document::enqueueAnimationFrameTask(std::unique_ptr<WTF::Closure> task) {
4280 ensureScriptedAnimationController().enqueueTask(std::move(task));
4281 }
4282
4279 void Document::enqueueAnimationFrameEvent(Event* event) { 4283 void Document::enqueueAnimationFrameEvent(Event* event) {
4280 ensureScriptedAnimationController().enqueueEvent(event); 4284 ensureScriptedAnimationController().enqueueEvent(event);
4281 } 4285 }
4282 4286
4283 void Document::enqueueUniqueAnimationFrameEvent(Event* event) { 4287 void Document::enqueueUniqueAnimationFrameEvent(Event* event) {
4284 ensureScriptedAnimationController().enqueuePerFrameEvent(event); 4288 ensureScriptedAnimationController().enqueuePerFrameEvent(event);
4285 } 4289 }
4286 4290
4287 void Document::enqueueScrollEventForNode(Node* target) { 4291 void Document::enqueueScrollEventForNode(Node* target) {
4288 // Per the W3C CSSOM View Module only scroll events fired at the document 4292 // Per the W3C CSSOM View Module only scroll events fired at the document
(...skipping 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
6563 } 6567 }
6564 6568
6565 void showLiveDocumentInstances() { 6569 void showLiveDocumentInstances() {
6566 WeakDocumentSet& set = liveDocumentSet(); 6570 WeakDocumentSet& set = liveDocumentSet();
6567 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6571 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6568 for (Document* document : set) 6572 for (Document* document : set)
6569 fprintf(stderr, "- Document %p URL: %s\n", document, 6573 fprintf(stderr, "- Document %p URL: %s\n", document,
6570 document->url().getString().utf8().data()); 6574 document->url().getString().utf8().data());
6571 } 6575 }
6572 #endif 6576 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698