Index: Source/devtools/front_end/ui/Toolbar.js |
diff --git a/Source/devtools/front_end/ui/Toolbar.js b/Source/devtools/front_end/ui/Toolbar.js |
index 43298dc7b11d7cb4206ee4c7c108a183fd8419d3..31d7bd114c6019738e618f81fa3b8f4f9ac4fe92 100644 |
--- a/Source/devtools/front_end/ui/Toolbar.js |
+++ b/Source/devtools/front_end/ui/Toolbar.js |
@@ -31,17 +31,19 @@ |
/** |
* @constructor |
* @param {!Element=} parentElement |
+ * @param {boolean=} withBorder |
*/ |
-WebInspector.Toolbar = function(parentElement) |
+WebInspector.Toolbar = function(parentElement, withBorder) |
{ |
/** @type {!Array.<!WebInspector.ToolbarItem>} */ |
this._items = []; |
this.element = parentElement ? parentElement.createChild("div", "toolbar") : createElementWithClass("div", "toolbar"); |
- |
this._shadowRoot = WebInspector.createShadowRootWithCoreStyles(this.element); |
this._shadowRoot.appendChild(WebInspector.Widget.createStyleElement("ui/toolbar.css")); |
this._contentElement = this._shadowRoot.createChild("div", "toolbar-shadow"); |
this._contentElement.createChild("content"); |
+ if (withBorder) |
dgozman
2015/06/09 13:27:02
Drop this one.
pfeldman
2015/06/09 13:40:59
Done.
|
+ this._contentElement.classList.add("with-border"); |
} |
WebInspector.Toolbar.prototype = { |
@@ -538,7 +540,7 @@ WebInspector.ToolbarButtonBase.prototype = { |
for (var i = 0; i < buttons.length; ++i) { |
if (buttons[i].element.classList.contains("emulate-active")) { |
buttons[i].element.classList.remove("emulate-active"); |
- buttons[i]._clicked(); |
+ buttons[i]._clicked(e); |
break; |
} |
} |
@@ -925,10 +927,11 @@ WebInspector.ToolbarStatesSettingButton.prototype = { |
* @extends {WebInspector.Toolbar} |
* @param {string} location |
* @param {!Element=} parentElement |
+ * @param {boolean=} withBorder |
*/ |
-WebInspector.ExtensibleToolbar = function(location, parentElement) |
+WebInspector.ExtensibleToolbar = function(location, parentElement, withBorder) |
{ |
- WebInspector.Toolbar.call(this, parentElement); |
+ WebInspector.Toolbar.call(this, parentElement, withBorder); |
this._loadItems(location); |
} |