Make object property symbols pinnable and adjust symbol color in console.

BUG=376194

Review URL: https://codereview.chromium.org/324013005

git-svn-id: svn://svn.chromium.org/blink/trunk@175901 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6b63ae4f
......@@ -195,6 +195,8 @@ WebInspector.ObjectPropertyTreeElement.prototype = {
this.nameElement.classList.add("dimmed");
if (this.property.isAccessorProperty())
this.nameElement.classList.add("properties-accessor-property-name");
if (this.property.symbol)
this.nameElement.addEventListener("contextmenu", this._contextMenuFired.bind(this, this.property.symbol), false);
var separatorElement = document.createElement("span");
separatorElement.className = "separator";
......
......@@ -1218,7 +1218,8 @@ ol.watch-expressions > li.hovered {
}
.console-formatted-string,
.console-formatted-regexp {
.console-formatted-regexp,
.console-formatted-symbol {
color: rgb(196, 26, 22);
white-space: pre;
unicode-bidi: -webkit-isolate;
......
......@@ -334,8 +334,9 @@ WebInspector.RemoteObjectImpl.prototype = {
for (var i = 0; properties && i < properties.length; ++i) {
var property = properties[i];
var propertyValue = property.value ? this._target.runtimeModel.createRemoteObject(property.value) : null;
var propertySymbol = property.symbol ? this._target.runtimeModel.createRemoteObject(property.symbol) : null;
var remoteProperty = new WebInspector.RemoteObjectProperty(property.name, propertyValue,
!!property.enumerable, !!property.writable, !!property.isOwn, !!property.wasThrown);
!!property.enumerable, !!property.writable, !!property.isOwn, !!property.wasThrown, propertySymbol);
if (typeof property.value === "undefined") {
if (property.get && property.get.type !== "undefined")
......@@ -721,8 +722,9 @@ WebInspector.ScopeRef = function(number, callFrameId, functionId)
* @param {boolean=} writable
* @param {boolean=} isOwn
* @param {boolean=} wasThrown
* @param {?WebInspector.RemoteObject=} symbol
*/
WebInspector.RemoteObjectProperty = function(name, value, enumerable, writable, isOwn, wasThrown)
WebInspector.RemoteObjectProperty = function(name, value, enumerable, writable, isOwn, wasThrown, symbol)
{
this.name = name;
if (value !== null)
......@@ -731,6 +733,8 @@ WebInspector.RemoteObjectProperty = function(name, value, enumerable, writable,
this.writable = typeof writable !== "undefined" ? writable : true;
this.isOwn = !!isOwn;
this.wasThrown = !!wasThrown;
if (symbol)
this.symbol = symbol;
}
WebInspector.RemoteObjectProperty.prototype = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment