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

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: Review changes 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
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorPageAgent.cpp
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp
index d218e8ba0629fef86666b44d659f2a4cdd9785b2..48e964f56ca5aa764ac55245851022124eeec1c8 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,14 @@ void InspectorPageAgent::setShowViewportSizeOnResize(ErrorString*, bool show, co
m_state->setBoolean(PageAgentState::showGridOnResize, asBool(showGrid));
}
+void InspectorPageAgent::setAnimationsPlaybackRate(ErrorString*, double playbackRate)
+{
+ for (Frame* frame = m_page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
+ if (frame->isLocalFrame())
+ toLocalFrame(frame)->document()->timeline().setPlaybackRate(playbackRate);
+ }
+}
+
void InspectorPageAgent::clearEditedResourcesContent()
{
m_editedResourceContent.clear();
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.h ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698