Bug 816440 - Watch expression evaluations should not display the configurable/enumerable/writable tooltip, r=past

This commit is contained in:
Victor Porof
2012-12-11 09:36:50 +02:00
parent e4aab656bf
commit c3300f6be2
2 changed files with 24 additions and 15 deletions

View File

@@ -637,6 +637,7 @@ StackFrames.prototype = {
let arrow = L10N.getStr("watchExpressionsSeparatorLabel");
let scope = DebuggerView.Variables.addScope(label);
scope.separator = arrow;
scope.showDescriptorTooltip = false;
scope.allowNameInput = true;
scope.allowDeletion = true;
scope.contextMenu = "debuggerWatchExpressionsContextMenu";

View File

@@ -660,6 +660,13 @@ Scope.prototype = {
*/
set twisty(aFlag) aFlag ? this.showArrow() : this.hideArrow(),
/**
* Specifies if the configurable/enumerable/writable tooltip should be shown
* whenever a variable or property descriptor is available.
* This flag applies non-recursively to the current scope.
*/
showDescriptorTooltip: true,
/**
* Specifies if editing variable or property names is allowed.
* This flag applies non-recursively to the current scope.
@@ -1256,6 +1263,7 @@ create({ constructor: Variable, proto: Scope.prototype }, {
this._target.removeEventListener("mouseover", this._displayTooltip, false);
let document = this.document;
if (this.ownerView.showDescriptorTooltip) {
let tooltip = document.createElement("tooltip");
tooltip.id = "tooltip-" + this.id;
@@ -1275,7 +1283,7 @@ create({ constructor: Variable, proto: Scope.prototype }, {
this._target.appendChild(tooltip);
this._target.setAttribute("tooltip", tooltip.id);
}
if (this.ownerView.allowNameInput) {
this._name.setAttribute("tooltiptext", L10N.getStr("variablesEditableNameTooltip"));
}