Index: third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleWidget.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleWidget.js b/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleWidget.js |
index 15e246aa702ba75a438251a7a50ecc906ad3c7da..f0100c6c94cf83a07e06229dfdbd78cd04927aba 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleWidget.js |
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleWidget.js |
@@ -149,6 +149,14 @@ WebInspector.ComputedStyleWidget.prototype = { |
*/ |
_innerRebuildUpdate: function(nodeStyle, matchedStyles) |
{ |
+ /** @type {!Set<string>} */ |
+ var expandedProperties = new Set(); |
+ for (var treeElement of this._propertiesOutline.rootElement().children()) { |
+ if (!treeElement.expanded) |
+ continue; |
+ var propertyName = treeElement[WebInspector.ComputedStyleWidget._propertySymbol].name; |
+ expandedProperties.add(propertyName); |
+ } |
this._propertiesOutline.removeChildren(); |
this._linkifier.reset(); |
var cssModel = this._computedStyleModel.cssModel(); |
@@ -213,6 +221,8 @@ WebInspector.ComputedStyleWidget.prototype = { |
treeElement.listItemElement.addEventListener("click", handleClick.bind(null, treeElement), false); |
var gotoSourceElement = propertyValueElement.createChild("div", "goto-source-icon"); |
gotoSourceElement.addEventListener("click", this._navigateToSource.bind(this, activeProperty)); |
+ if (expandedProperties.has(propertyName)) |
dgozman
2016/07/16 01:14:56
Why is this inside "if (trace)" block?
lushnikov
2016/07/16 03:47:48
Only properties with traces are expandable; others
|
+ treeElement.expand(); |
} |
} |