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

Unified Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 717003002: Animations: Allow document animation timelines to have a playback rate (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/inspector/InspectorPageAgent.cpp
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp
index d218e8ba0629fef86666b44d659f2a4cdd9785b2..b2b5475285bbb70cbabb085a9f97bf9aa83a528a 100644
--- a/Source/core/inspector/InspectorPageAgent.cpp
+++ b/Source/core/inspector/InspectorPageAgent.cpp
@@ -36,6 +36,7 @@
#include "bindings/core/v8/ScriptRegexp.h"
#include "core/HTMLNames.h"
#include "core/UserAgentStyleSheets.h"
+#include "core/animation/AnimationTimeline.h"
#include "core/css/StyleSheetContents.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/css/resolver/ViewportStyleResolver.h"
@@ -1475,6 +1476,17 @@ void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
m_state->setBoolean(PageAgentState::showGridOnResize, asBool(showGrid));
}
+void InspectorPageAgent::setAnimationsPlaybackRate(ErrorString*, double playbackRate)
+{
+ WillBeHeapVector<RefPtrWillBeMember<Document>> documents;
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (frame->isLocalFrame())
+ documents.append(toLocalFrame(frame)->document());
+ }
+ for (auto& document : documents)
+ document->timeline().setPlaybackRateForInspector(playbackRate);
alancutter (OOO until 2018) 2014/11/12 03:19:18 No need for vector, just perform this operation in
samli 2014/11/12 20:01:13 Done.
+}
+
void InspectorPageAgent::clearEditedResourcesContent()
{
m_editedResourceContent.clear();

Powered by Google App Engine
This is Rietveld 408576698