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

Side by Side Diff: Source/core/page/PageAnimator.cpp

Issue 212393002: Web Animations API: Ensure timing is updated if a RAF callback makes a player outdated. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove assert. Created 6 years, 9 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
« no previous file with comments | « Source/core/animation/DocumentAnimations.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/page/PageAnimator.h" 6 #include "core/page/PageAnimator.h"
7 7
8 #include "core/animation/DocumentAnimations.h" 8 #include "core/animation/DocumentAnimations.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 23 matching lines...) Expand all
34 DocumentAnimations::updateAnimationTimingForAnimationFrame(*frame->docum ent(), monotonicAnimationStartTime); 34 DocumentAnimations::updateAnimationTimingForAnimationFrame(*frame->docum ent(), monotonicAnimationStartTime);
35 SVGDocumentExtensions::serviceOnAnimationFrame(*frame->document(), monot onicAnimationStartTime); 35 SVGDocumentExtensions::serviceOnAnimationFrame(*frame->document(), monot onicAnimationStartTime);
36 } 36 }
37 37
38 Vector<RefPtr<Document> > documents; 38 Vector<RefPtr<Document> > documents;
39 for (LocalFrame* frame = m_page->mainFrame(); frame; frame = frame->tree().t raverseNext()) 39 for (LocalFrame* frame = m_page->mainFrame(); frame; frame = frame->tree().t raverseNext())
40 documents.append(frame->document()); 40 documents.append(frame->document());
41 41
42 for (size_t i = 0; i < documents.size(); ++i) 42 for (size_t i = 0; i < documents.size(); ++i)
43 documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime); 43 documents[i]->serviceScriptedAnimations(monotonicAnimationStartTime);
44
45 // Frame callbacks might have started new players or caused existing players to become outdated.
46 for (size_t i = 0; i < documents.size(); ++i)
47 DocumentAnimations::updateOutdatedAnimationPlayersAfterFrameCallbacks(*d ocuments[i]);
44 } 48 }
45 49
46 void PageAnimator::scheduleVisualUpdate() 50 void PageAnimator::scheduleVisualUpdate()
47 { 51 {
48 // FIXME: also include m_animationFramePending here. It is currently not the re due to crbug.com/353756. 52 // FIXME: also include m_animationFramePending here. It is currently not the re due to crbug.com/353756.
49 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting) 53 if (m_servicingAnimations || m_updatingLayoutAndStyleForPainting)
50 return; 54 return;
51 m_page->chrome().scheduleAnimation(); 55 m_page->chrome().scheduleAnimation();
52 } 56 }
53 57
(...skipping 10 matching lines...) Expand all
64 // setFrameRect(). This will be a quick operation for most frames, but the 68 // setFrameRect(). This will be a quick operation for most frames, but the
65 // NativeWindowWidgets will update a proper clipping region. 69 // NativeWindowWidgets will update a proper clipping region.
66 view->setFrameRect(view->frameRect()); 70 view->setFrameRect(view->frameRect());
67 71
68 // setFrameRect may have the side-effect of causing existing page layout to 72 // setFrameRect may have the side-effect of causing existing page layout to
69 // be invalidated, so layout needs to be called last. 73 // be invalidated, so layout needs to be called last.
70 view->updateLayoutAndStyleForPainting(); 74 view->updateLayoutAndStyleForPainting();
71 } 75 }
72 76
73 } 77 }
OLDNEW
« no previous file with comments | « Source/core/animation/DocumentAnimations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698