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

Side by Side Diff: Source/devtools/front_end/elements/AnimationsSidebarPane.js

Issue 664993002: Devtools Animations: Display keyframes for CSS Animations in inspector (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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.SidebarPane} 7 * @extends {WebInspector.SidebarPane}
8 */ 8 */
9 WebInspector.AnimationsSidebarPane = function(stylesPane) 9 WebInspector.AnimationsSidebarPane = function(stylesPane)
10 { 10 {
(...skipping 26 matching lines...) Expand all
37 return; 37 return;
38 } 38 }
39 39
40 for (var i = 0; i < animationPlayers.length; ++i) { 40 for (var i = 0; i < animationPlayers.length; ++i) {
41 var player = animationPlayers[i]; 41 var player = animationPlayers[i];
42 this._animationSections[i] = new WebInspector.AnimationSection(t his, player); 42 this._animationSections[i] = new WebInspector.AnimationSection(t his, player);
43 var separatorElement = this.bodyElement.createChild("div", "side bar-separator"); 43 var separatorElement = this.bodyElement.createChild("div", "side bar-separator");
44 var id = player.source().name() ? player.source().name() : playe r.id(); 44 var id = player.source().name() ? player.source().name() : playe r.id();
45 separatorElement.createTextChild(WebInspector.UIString("Animatio n") + " " + id); 45 separatorElement.createTextChild(WebInspector.UIString("Animatio n") + " " + id);
46 this.bodyElement.appendChild(this._animationSections[i].element) ; 46 this.bodyElement.appendChild(this._animationSections[i].element) ;
47
48 if (player.source().keyframesRule()) {
49 var keyframes = player.source().keyframesRule().keyframes();
50 for (var j = 0; j < keyframes.length; j++) {
51 var inlineStyle = { selectorText: keyframes[j].offset(), style: keyframes[j].style(), isAttribute: true };
52 var section = new WebInspector.StylePropertiesSection(th is._stylesPane, inlineStyle, true, false);
53 section.expanded = true;
54 this.bodyElement.appendChild(section.element);
55 }
56 }
47 } 57 }
48 } 58 }
49 59
60 if (!node)
61 return;
62
50 if (this._selectedNode === node) { 63 if (this._selectedNode === node) {
51 for (var i = 0; i < this._animationSections.length; ++i) 64 for (var i = 0; i < this._animationSections.length; ++i)
52 this._animationSections[i].updateCurrentTime(); 65 this._animationSections[i].updateCurrentTime();
53 return; 66 return;
54 } 67 }
55 this._selectedNode = node; 68 this._selectedNode = node;
56 node.target().animationModel.animationPlayers(node.id, animationPlayersC allback.bind(this)); 69 node.target().animationModel.animationPlayers(node.id, animationPlayersC allback.bind(this));
57 }, 70 },
58 __proto__: WebInspector.SidebarPane.prototype 71 __proto__: WebInspector.SidebarPane.prototype
59 } 72 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 "duration": p.source().duration(), 217 "duration": p.source().duration(),
205 "direction": p.source().direction(), 218 "direction": p.source().direction(),
206 "fill-mode": p.source().fillMode(), 219 "fill-mode": p.source().fillMode(),
207 "time-fraction": p.source().timeFraction() 220 "time-fraction": p.source().timeFraction()
208 }; 221 };
209 var obj = WebInspector.RemoteObject.fromLocalObject(animationObject); 222 var obj = WebInspector.RemoteObject.fromLocalObject(animationObject);
210 var section = new WebInspector.ObjectPropertiesSection(obj, WebInspector .UIString("Animation Properties")); 223 var section = new WebInspector.ObjectPropertiesSection(obj, WebInspector .UIString("Animation Properties"));
211 this.propertiesSection.appendChild(section.element); 224 this.propertiesSection.appendChild(section.element);
212 } 225 }
213 } 226 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorAnimationAgent.cpp ('k') | Source/devtools/front_end/sdk/AnimationModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698