| Index: Source/devtools/front_end/ObjectPropertiesSection.js
|
| diff --git a/Source/devtools/front_end/ObjectPropertiesSection.js b/Source/devtools/front_end/ObjectPropertiesSection.js
|
| index edd37c782c8a82bc16e502407d80698ce6a80863..ce936e4c2a6d18b9e4e4d44966ad000c8cc7ed05 100644
|
| --- a/Source/devtools/front_end/ObjectPropertiesSection.js
|
| +++ b/Source/devtools/front_end/ObjectPropertiesSection.js
|
| @@ -204,18 +204,20 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
|
| this.valueElement = document.createElement("span");
|
| this.valueElement.className = "value";
|
| var description = this.property.value.description;
|
| - // Render \n as a nice unicode cr symbol.
|
| + var valueText;
|
| if (this.property.wasThrown) {
|
| - this.valueElement.textContent = "[Exception: " + description + "]";
|
| + valueText = "[Exception: " + description + "]";
|
| } else if (this.property.value.type === "string" && typeof description === "string") {
|
| - this.valueElement.textContent = "\"" + description.replace(/\n/g, "\u21B5") + "\"";
|
| + // Render \n as a nice unicode cr symbol.
|
| + valueText = "\"" + description.replace(/\n/g, "\u21B5") + "\"";
|
| this.valueElement._originalTextContent = "\"" + description + "\"";
|
| } else if (this.property.value.type === "function" && typeof description === "string") {
|
| - this.valueElement.textContent = /.*/.exec(description)[0].replace(/ +$/g, "");
|
| + valueText = /.*/.exec(description)[0].replace(/ +$/g, "");
|
| this.valueElement._originalTextContent = description;
|
| } else if (this.property.value.type !== "object" || this.property.value.subtype !== "node") {
|
| - this.valueElement.textContent = description;
|
| + valueText = description;
|
| }
|
| + this.valueElement.setTextContentTruncatedIfNeeded(valueText || "");
|
|
|
| if (this.property.wasThrown)
|
| this.valueElement.classList.add("error");
|
| @@ -316,7 +318,7 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
|
|
|
| // Edit original source.
|
| if (typeof valueToEdit !== "undefined")
|
| - elementToEdit.textContent = valueToEdit;
|
| + elementToEdit.setTextContentTruncatedIfNeeded(valueToEdit, WebInspector.UIString("<string is too large to edit>"));
|
|
|
| var context = { expanded: this.expanded, elementToEdit: elementToEdit, previousContent: elementToEdit.textContent };
|
|
|
|
|