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..79a3632268c026dc628f7f126382c4ab797c7262 100644 |
--- a/Source/devtools/front_end/ObjectPropertiesSection.js |
+++ b/Source/devtools/front_end/ObjectPropertiesSection.js |
@@ -204,17 +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. |
if (this.property.wasThrown) { |
- this.valueElement.textContent = "[Exception: " + description + "]"; |
+ var text = "[Exception: " + description + "]"; |
+ this.valueElement.setTextContentTruncatedIfNeeded(text); |
pfeldman
2014/03/05 05:14:03
Do it once for all below?
aandrey
2014/03/05 10:47:35
Done.
|
} 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. |
+ var text = "\"" + description.replace(/\n/g, "\u21B5") + "\""; |
+ this.valueElement.setTextContentTruncatedIfNeeded(text); |
this.valueElement._originalTextContent = "\"" + description + "\""; |
} else if (this.property.value.type === "function" && typeof description === "string") { |
- this.valueElement.textContent = /.*/.exec(description)[0].replace(/ +$/g, ""); |
+ var text = /.*/.exec(description)[0].replace(/ +$/g, ""); |
+ this.valueElement.setTextContentTruncatedIfNeeded(text); |
this.valueElement._originalTextContent = description; |
pfeldman
2014/03/05 05:14:03
Accidental click will start editing the original.
aandrey
2014/03/05 10:47:35
Done.
|
} else if (this.property.value.type !== "object" || this.property.value.subtype !== "node") { |
- this.valueElement.textContent = description; |
+ this.valueElement.setTextContentTruncatedIfNeeded(description); |
} |
if (this.property.wasThrown) |
@@ -316,7 +319,7 @@ WebInspector.ObjectPropertyTreeElement.prototype = { |
// Edit original source. |
if (typeof valueToEdit !== "undefined") |
- elementToEdit.textContent = valueToEdit; |
+ elementToEdit.setTextContentTruncatedIfNeeded(valueToEdit); |
var context = { expanded: this.expanded, elementToEdit: elementToEdit, previousContent: elementToEdit.textContent }; |