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

Side by Side Diff: Source/devtools/front_end/timeline/LayerDetailsView.js

Issue 670503002: Timeline: add layer details view (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 "layerForScrollbar": WebInspector.UIString("Layer for scrollbar."), 81 "layerForScrollbar": WebInspector.UIString("Layer for scrollbar."),
82 "layerForScrollingContainer": WebInspector.UIString("Layer for scrolling con tainer."), 82 "layerForScrollingContainer": WebInspector.UIString("Layer for scrolling con tainer."),
83 "layerForForeground": WebInspector.UIString("Layer for foreground."), 83 "layerForForeground": WebInspector.UIString("Layer for foreground."),
84 "layerForBackground": WebInspector.UIString("Layer for background."), 84 "layerForBackground": WebInspector.UIString("Layer for background."),
85 "layerForMask": WebInspector.UIString("Layer for mask."), 85 "layerForMask": WebInspector.UIString("Layer for mask."),
86 "layerForVideoOverlay": WebInspector.UIString("Layer for video overlay.") 86 "layerForVideoOverlay": WebInspector.UIString("Layer for video overlay.")
87 }; 87 };
88 88
89 WebInspector.LayerDetailsView.prototype = { 89 WebInspector.LayerDetailsView.prototype = {
90 /** 90 /**
91 * @param {!WebInspector.Layers3DView.ActiveObject} activeObject 91 * @param {?WebInspector.Layers3DView.ActiveObject} activeObject
92 */ 92 */
93 setObject: function(activeObject) 93 setObject: function(activeObject)
94 { 94 {
95 this._layer = activeObject ? activeObject.layer : null; 95 this._layer = activeObject ? activeObject.layer : null;
96 this._scrollRectIndex = activeObject ? activeObject.scrollRectIndex : nu ll; 96 this._scrollRectIndex = activeObject ? activeObject.scrollRectIndex : nu ll;
97 if (this.isShowing()) 97 if (this.isShowing())
98 this.update(); 98 this.update();
99 }, 99 },
100 100
101 wasShown: function() 101 wasShown: function()
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 /** 175 /**
176 * @param {!Array.<string>} compositingReasons 176 * @param {!Array.<string>} compositingReasons
177 */ 177 */
178 _updateCompositingReasons: function(compositingReasons) 178 _updateCompositingReasons: function(compositingReasons)
179 { 179 {
180 if (!compositingReasons || !compositingReasons.length) { 180 if (!compositingReasons || !compositingReasons.length) {
181 this._compositingReasonsCell.textContent = "n/a"; 181 this._compositingReasonsCell.textContent = "n/a";
182 return; 182 return;
183 } 183 }
184 var fragment = createDocumentFragment(); 184 this._compositingReasonsCell.removeChildren();
185 var list = this._compositingReasonsCell.createChild("ul");
185 for (var i = 0; i < compositingReasons.length; ++i) { 186 for (var i = 0; i < compositingReasons.length; ++i) {
186 if (i) 187 var text = WebInspector.LayerDetailsView.CompositingReasonDetail[com positingReasons[i]] || compositingReasons[i];
187 fragment.createTextChild(","); 188 // If the text is more than one word but does not terminate with per iod, add the period.
188 var span = createElement("span"); 189 if (/\s.*[^.]$/.test(text))
189 span.title = WebInspector.LayerDetailsView.CompositingReasonDetail[c ompositingReasons[i]] || ""; 190 text += ".";
190 span.textContent = compositingReasons[i]; 191 list.createChild("li").textContent = text;
191 fragment.appendChild(span);
192 } 192 }
193 this._compositingReasonsCell.removeChildren();
194 this._compositingReasonsCell.appendChild(fragment);
195 }, 193 },
196 194
197 __proto__: WebInspector.VBox.prototype 195 __proto__: WebInspector.VBox.prototype
198 } 196 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/LayerTreeModel.js ('k') | Source/devtools/front_end/timeline/Layers3DView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698