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

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

Issue 662793002: [DevTools] Replace usages of document with custom functions. (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 163 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 = 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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/extensions/ExtensionView.js ('k') | Source/devtools/front_end/layers/LayerTreeOutline.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698