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

Side by Side Diff: Source/WebCore/inspector/front-end/ObjectPropertiesSection.js

Issue 6390007: Merge 76692 - 2011-01-26 Pavel Feldman <pfeldman@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 this.nameElement = document.createElement("span"); 173 this.nameElement = document.createElement("span");
174 this.nameElement.className = "name"; 174 this.nameElement.className = "name";
175 this.nameElement.textContent = this.property.name; 175 this.nameElement.textContent = this.property.name;
176 176
177 var separatorElement = document.createElement("span"); 177 var separatorElement = document.createElement("span");
178 separatorElement.className = "separator"; 178 separatorElement.className = "separator";
179 separatorElement.textContent = ": "; 179 separatorElement.textContent = ": ";
180 180
181 this.valueElement = document.createElement("span"); 181 this.valueElement = document.createElement("span");
182 this.valueElement.className = "value"; 182 this.valueElement.className = "value";
183 this.valueElement.textContent = this.property.value.description; 183
184 var description = this.property.value.description;
185 // Render \n as a nice unicode cr symbol.
186 if (this.property.value.type === "string" && typeof description === "str ing")
187 description = description.replace(/\n/g, "\u21B5");
188 this.valueElement.textContent = description;
189
184 if (this.property.isGetter) 190 if (this.property.isGetter)
185 this.valueElement.addStyleClass("dimmed"); 191 this.valueElement.addStyleClass("dimmed");
186 if (this.property.value.isError()) 192 if (this.property.value.isError())
187 this.valueElement.addStyleClass("error"); 193 this.valueElement.addStyleClass("error");
188 if (this.property.value.type) 194 if (this.property.value.type)
189 this.valueElement.addStyleClass("console-formatted-" + this.property .value.type); 195 this.valueElement.addStyleClass("console-formatted-" + this.property .value.type);
190 if (this.property.value.type === "node") 196 if (this.property.value.type === "node")
191 this.valueElement.addEventListener("contextmenu", this._contextMenuE ventFired.bind(this), true); 197 this.valueElement.addEventListener("contextmenu", this._contextMenuE ventFired.bind(this), true);
192 198
193 this.listItemElement.removeChildren(); 199 this.listItemElement.removeChildren();
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } else { 293 } else {
288 // Call updateSiblings since their value might be based on the v alue that just changed. 294 // Call updateSiblings since their value might be based on the v alue that just changed.
289 self.updateSiblings(); 295 self.updateSiblings();
290 } 296 }
291 }; 297 };
292 this.property.parentObject.setPropertyValue(this.property.name, expressi on.trim(), callback); 298 this.property.parentObject.setPropertyValue(this.property.name, expressi on.trim(), callback);
293 } 299 }
294 } 300 }
295 301
296 WebInspector.ObjectPropertyTreeElement.prototype.__proto__ = TreeElement.prototy pe; 302 WebInspector.ObjectPropertyTreeElement.prototype.__proto__ = TreeElement.prototy pe;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698