Commit e95044b6 authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

DevTools: propagate experiments that are enabled by default into default.

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

git-svn-id: svn://svn.chromium.org/blink/trunk@200777 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5b7dbda5
......@@ -64,7 +64,6 @@ WebInspector.AdvancedApp.prototype = {
WebInspector.initializeUIUtils(toolboxDocument.defaultView);
WebInspector.installComponentRootStyles(/** @type {!Element} */ (toolboxDocument.body));
WebInspector.ContextMenu.installHandler(toolboxDocument);
if (Runtime.experiments.isEnabled("tooltips"))
WebInspector.Tooltip.installHandler(toolboxDocument);
var rootView = new WebInspector.RootView();
......
......@@ -141,15 +141,12 @@ WebInspector.Main.prototype = {
Runtime.experiments.register("privateScriptInspection", "Private script inspection");
Runtime.experiments.register("promiseTracker", "Promise inspector");
Runtime.experiments.register("securityPanel", "Security panel", true);
Runtime.experiments.register("serviceWorkersInPageFrontend", "Service workers in DevTools for page");
Runtime.experiments.register("serviceWorkersInResources", "Service workers in Resources panel", true);
Runtime.experiments.register("showPrimaryLoadWaterfallInNetworkTimeline", "Show primary load waterfall in Network timeline", true);
Runtime.experiments.register("stepIntoAsync", "Step into async");
Runtime.experiments.register("timelineInvalidationTracking", "Timeline invalidation tracking", true);
Runtime.experiments.register("timelineTracingJSProfile", "Timeline tracing based JS profiler", true);
Runtime.experiments.register("timelineFlowEvents", "Timeline flow events", true);
Runtime.experiments.register("tooltips", "Tooltips");
Runtime.experiments.register("inlineVariableValues", "Display variable values inline while debugging");
Runtime.experiments.cleanUpStaleExperiments();
......@@ -169,9 +166,6 @@ WebInspector.Main.prototype = {
}
Runtime.experiments.setDefaultExperiments([
"inlineVariableValues",
"serviceWorkersInPageFrontend",
"tooltips"
]);
},
......@@ -192,7 +186,6 @@ WebInspector.Main.prototype = {
WebInspector.inspectorView = new WebInspector.InspectorView();
WebInspector.ContextMenu.initialize();
WebInspector.ContextMenu.installHandler(document);
if (Runtime.experiments.isEnabled("tooltips"))
WebInspector.Tooltip.installHandler(document);
WebInspector.dockController = new WebInspector.DockController(canDock);
WebInspector.overridesSupport = new WebInspector.OverridesSupport();
......
......@@ -139,7 +139,7 @@ WebInspector.Target.prototype = {
this.tracingManager = new WebInspector.TracingManager(this);
if (this.isPage() && (Runtime.experiments.isEnabled("serviceWorkersInPageFrontend") || Runtime.experiments.isEnabled("serviceWorkersInResources")))
if (this.isPage())
this.serviceWorkerManager = new WebInspector.ServiceWorkerManager(this);
if (callback)
......
......@@ -729,7 +729,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
_generateValuesInSource: function()
{
if (!Runtime.experiments.isEnabled("inlineVariableValues") || !WebInspector.moduleSetting("inlineVariableValues").get())
if (!WebInspector.moduleSetting("inlineVariableValues").get())
return;
var executionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
if (!executionContext)
......
......@@ -75,7 +75,6 @@ WebInspector.SourcesPanel = function(workspaceForTest)
this.sidebarPanes.callstack.registerShortcuts(this.registerShortcuts.bind(this));
this.sidebarPanes.scopechain = new WebInspector.ScopeChainSidebarPane();
if (Runtime.experiments.isEnabled("serviceWorkersInPageFrontend"))
this.sidebarPanes.serviceWorkers = new WebInspector.ServiceWorkersSidebarPane();
this.sidebarPanes.jsBreakpoints = new WebInspector.JavaScriptBreakpointsSidebarPane(WebInspector.breakpointManager, this.showUISourceCode.bind(this));
this.sidebarPanes.domBreakpoints = WebInspector.domBreakpointsSidebarPane.createProxy(this);
......@@ -445,7 +444,7 @@ WebInspector.SourcesPanel.prototype = {
this._stepIntoButton.setEnabled(false);
this._stepOutButton.setEnabled(false);
} else if (this._paused) {
this._updateButtonTitle(this._pauseButton, WebInspector.UIString("Resume script execution"));
this._pauseButton.setTitle(WebInspector.UIString("Resume script execution"));
this._pauseButton.setToggled(true);
this._pauseButton.setLongClickOptionsEnabled((function() { return [ this._longResumeButton ]; }).bind(this));
......@@ -454,7 +453,7 @@ WebInspector.SourcesPanel.prototype = {
this._stepIntoButton.setEnabled(true);
this._stepOutButton.setEnabled(true);
} else {
this._updateButtonTitle(this._pauseButton, WebInspector.UIString("Pause script execution"));
this._pauseButton.setTitle(WebInspector.UIString("Pause script execution"));
this._pauseButton.setToggled(false);
this._pauseButton.setLongClickOptionsEnabled(null);
......@@ -783,21 +782,6 @@ WebInspector.SourcesPanel.prototype = {
return debugToolbarDrawer;
},
/**
* @param {!WebInspector.ToolbarButton} button
* @param {string} buttonTitle
*/
_updateButtonTitle: function(button, buttonTitle)
{
var hasShortcuts = button._shortcuts && button._shortcuts.length;
if (hasShortcuts && Runtime.experiments.isEnabled("tooltips"))
button.setTitle(buttonTitle);
else if (hasShortcuts)
button.setTitle(WebInspector.UIString(buttonTitle + " (%s)", button._shortcuts[0].name));
else
button.setTitle(buttonTitle);
},
/**
* @param {string} buttonId
* @param {string} buttonTitle
......@@ -809,7 +793,7 @@ WebInspector.SourcesPanel.prototype = {
var button = new WebInspector.ToolbarButton(buttonTitle, buttonId);
button.setAction(actionId);
button._shortcuts = WebInspector.shortcutRegistry.shortcutDescriptorsForAction(actionId);
this._updateButtonTitle(button, buttonTitle);
button.setTitle(buttonTitle);
return button;
},
......
......@@ -132,12 +132,7 @@ WebInspector.Tooltip.installHandler = function(doc)
*/
WebInspector.Tooltip.install = function(element, tooltipContent, actionId)
{
if (Runtime.experiments.isEnabled("tooltips") && typeof tooltipContent === "string" && tooltipContent === "")
if (typeof tooltipContent === "string" && tooltipContent === "")
return;
if (Runtime.experiments.isEnabled("tooltips"))
element[WebInspector.Tooltip._symbol] = { content: tooltipContent, actionId: actionId };
else if (typeof tooltipContent === "string")
element.title = tooltipContent;
else
console.assert("Cannot set an element without custom tooltips enabled");
}
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