Chromium Code Reviews| Index: Source/devtools/front_end/ui/SuggestBox.js |
| diff --git a/Source/devtools/front_end/ui/SuggestBox.js b/Source/devtools/front_end/ui/SuggestBox.js |
| index 51eab53043c54b835215b5713fc315577e3e990c..d03eef8306294746ecc2c075ec16b27ec5f1c916 100644 |
| --- a/Source/devtools/front_end/ui/SuggestBox.js |
| +++ b/Source/devtools/front_end/ui/SuggestBox.js |
| @@ -60,7 +60,6 @@ WebInspector.SuggestBox = function(suggestBoxDelegate, maxItemsHeight) |
| this._selectedIndex = -1; |
| this._selectedElement = null; |
| this._maxItemsHeight = maxItemsHeight; |
| - this._bodyElement = document.body; |
| this._maybeHideBound = this._maybeHide.bind(this); |
| this._element = createElementWithClass("div", "suggest-box"); |
| this._element.addEventListener("mousedown", this._onBoxMouseDown.bind(this), true); |
| @@ -138,11 +137,17 @@ WebInspector.SuggestBox.prototype = { |
| this._hideTimeoutId = window.setTimeout(this.hide.bind(this), 0); |
| }, |
| + /** |
| + * @public // FIXME: this is a workaround for validator bug (crbug.com/425506). |
|
apavlov
2014/10/21 15:15:38
We typically specify the leading http://, so that
dgozman
2014/10/22 08:04:03
Done.
|
| + * // FIXME: make SuggestBox work for multiple documents. |
| + * @suppressGlobalPropertiesCheck |
| + */ |
| _show: function() |
| { |
| if (this.visible()) |
| return; |
| this._overlay = new WebInspector.SuggestBox.Overlay(); |
| + this._bodyElement = document.body; |
| this._bodyElement.addEventListener("mousedown", this._maybeHideBound, true); |
| this._leftSpacerElement = this._overlay.element.createChild("div", "suggest-box-left-spacer"); |
| @@ -158,6 +163,7 @@ WebInspector.SuggestBox.prototype = { |
| return; |
| this._bodyElement.removeEventListener("mousedown", this._maybeHideBound, true); |
| + delete this._bodyElement; |
| this._element.remove(); |
| this._overlay.dispose(); |
| delete this._overlay; |
| @@ -410,6 +416,8 @@ WebInspector.SuggestBox.prototype = { |
| /** |
| * @constructor |
| + * // FIXME: make SuggestBox work for multiple documents. |
| + * @suppressGlobalPropertiesCheck |
| */ |
| WebInspector.SuggestBox.Overlay = function() |
| { |