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

Unified Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 2139043002: DevTools: show alternate title onexpand of object in console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DevTools: show alternate title onexpand of object in console Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
index de5cc8f1c0b8e4a70a18ab5c56d078fe933d13c0..dc6d2cf2b1fd5103fe2b32546f8fdb3d5ced5724 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js
@@ -432,11 +432,17 @@ WebInspector.ConsoleViewMessage.prototype = {
*/
_buildExpandableObjectSection: function(obj, titleElement)
{
- var note = titleElement.createChild("span", "object-state-note");
- note.classList.add("info-note");
- note.title = WebInspector.UIString("Object value at left was snapshotted when logged, value below was evaluated just now.");
+ var expandedTitleElement = null;
+ if (obj.description && WebInspector.ObjectPropertiesSection.needsAlternateTitle(obj)) {
lushnikov 2016/07/20 23:54:26 can we hide this inside the ObjectPropertiesSectio
luoe 2016/07/22 22:30:58 Done.
+ expandedTitleElement = createElement("span");
+ expandedTitleElement.createTextChild(obj.description);
+
+ var note = expandedTitleElement.createChild("span", "object-state-note");
+ note.classList.add("info-note");
+ note.title = WebInspector.UIString("Value below was evaluated just now.");
+ }
- var section = new WebInspector.ObjectPropertiesSection(obj, titleElement, this._linkifier);
+ var section = new WebInspector.ObjectPropertiesSection(obj, titleElement, expandedTitleElement, this._linkifier);
section.element.classList.add("console-view-object-properties-section");
section.enableContextMenu();
return section;

Powered by Google App Engine
This is Rietveld 408576698