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

Unified Diff: third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js

Issue 2137773002: [DevTools] Replace the target type with capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
index 4d4dcca0215b04030f4e0149b120f78ce3fab1ee..33b75da781d43dfe8ed46ce218df9c6d7bf9b585 100644
--- a/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/animation/AnimationModel.js
@@ -202,10 +202,12 @@ WebInspector.AnimationModel._symbol = Symbol("AnimationModel");
/**
* @param {!WebInspector.Target} target
- * @return {!WebInspector.AnimationModel}
+ * @return {?WebInspector.AnimationModel}
*/
WebInspector.AnimationModel.fromTarget = function(target)
{
+ if (!target.hasBrowserCapability())
+ return null;
if (!target[WebInspector.AnimationModel._symbol])
target[WebInspector.AnimationModel._symbol] = new WebInspector.AnimationModel(target);

Powered by Google App Engine
This is Rietveld 408576698