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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js

Issue 1592973002: Devtools: Fix auto-expanding of arrays and function scopes in watches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/watch-expressions-preserve-expansion-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js b/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
index bc803a02fa7484c4436e2761734e7b668d4001b2..c5e9f3026c82e33ebf0f7424131bda1e7d7ff74a 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/ObjectPropertiesSection.js
@@ -1282,7 +1282,7 @@ WebInspector.ObjectPropertiesSectionExpandController.prototype = {
*/
_elementAttached: function(event)
{
- var element = /** @type {!WebInspector.ObjectPropertyTreeElement|!WebInspector.ObjectPropertiesSection.RootElement} */ (event.data);
+ var element = /** @type {!TreeElement} */ (event.data);
if (element.isExpandable() && this._expandedProperties.has(this._propertyPath(element)))
element.expand();
},
@@ -1292,7 +1292,7 @@ WebInspector.ObjectPropertiesSectionExpandController.prototype = {
*/
_elementExpanded: function(event)
{
- var element = /** @type {!WebInspector.ObjectPropertyTreeElement|!WebInspector.ObjectPropertiesSection.RootElement} */ (event.data);
+ var element = /** @type {!TreeElement} */ (event.data);
this._expandedProperties.add(this._propertyPath(element));
},
@@ -1301,12 +1301,12 @@ WebInspector.ObjectPropertiesSectionExpandController.prototype = {
*/
_elementCollapsed: function(event)
{
- var element = /** @type {!WebInspector.ObjectPropertyTreeElement|!WebInspector.ObjectPropertiesSection.RootElement} */ (event.data);
+ var element = /** @type {!TreeElement} */ (event.data);
this._expandedProperties.delete(this._propertyPath(element));
},
/**
- * @param {!WebInspector.ObjectPropertyTreeElement|!WebInspector.ObjectPropertiesSection.RootElement} treeElement
+ * @param {!TreeElement} treeElement
* @return {string}
*/
_propertyPath: function(treeElement)
@@ -1321,7 +1321,13 @@ WebInspector.ObjectPropertiesSectionExpandController.prototype = {
var result;
while (current !== rootElement) {
- result = current.property.name + (result ? "." + result : "");
+ var currentName = "";
+ if (current.property)
+ currentName = current.property.name;
+ else
+ currentName = typeof current.title === "string" ? current.title : current.title.textContent;
+
+ result = currentName + (result ? "." + result : "");
current = current.parent;
}
var treeOutlineId = treeElement.treeOutline[WebInspector.ObjectPropertiesSectionExpandController._treeOutlineId];
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/watch-expressions-preserve-expansion-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698