| OLD | NEW | 
|    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  Loading... | 
|   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  Loading... | 
|  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 } | 
| OLD | NEW |