OLD | NEW |
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = document.createDocumentFragment(); | 184 var fragment = createDocumentFragment(); |
185 for (var i = 0; i < compositingReasons.length; ++i) { | 185 for (var i = 0; i < compositingReasons.length; ++i) { |
186 if (i) | 186 if (i) |
187 fragment.createTextChild(","); | 187 fragment.createTextChild(","); |
188 var span = document.createElement("span"); | 188 var span = createElement("span"); |
189 span.title = WebInspector.LayerDetailsView.CompositingReasonDetail[c
ompositingReasons[i]] || ""; | 189 span.title = WebInspector.LayerDetailsView.CompositingReasonDetail[c
ompositingReasons[i]] || ""; |
190 span.textContent = compositingReasons[i]; | 190 span.textContent = compositingReasons[i]; |
191 fragment.appendChild(span); | 191 fragment.appendChild(span); |
192 } | 192 } |
193 this._compositingReasonsCell.removeChildren(); | 193 this._compositingReasonsCell.removeChildren(); |
194 this._compositingReasonsCell.appendChild(fragment); | 194 this._compositingReasonsCell.appendChild(fragment); |
195 }, | 195 }, |
196 | 196 |
197 __proto__: WebInspector.VBox.prototype | 197 __proto__: WebInspector.VBox.prototype |
198 } | 198 } |
OLD | NEW |