<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[192594] trunk/Source/WebInspectorUI</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/192594">192594</a></dd>
<dt>Author</dt> <dd>mattbaker@apple.com</dd>
<dt>Date</dt> <dd>2015-11-18 15:47:52 -0800 (Wed, 18 Nov 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Probes sidebar panel sections should use NavigationBar
https://bugs.webkit.org/show_bug.cgi?id=151373
Reviewed by Brian Burg.
Replaces image elements with a NavigationBar instance. The "Clear samples"
button is disabled when no samples exist in the probe set.
* Localizations/en.lproj/localizedStrings.js:
New navigation item labels.
* UserInterface/Models/ProbeSet.js:
(WebInspector.ProbeSet.prototype._sampleCollected):
Dispatch new event WebInspector.ProbeSet.Event.SampleAdded.
* UserInterface/Views/DetailsSection.css:
(.details-section > .header > .options > .navigation-bar):
(.details-section > .header > .options > .navigation-bar > .item):
Define consistent style for showing a NavigationBar inside the section header.
* UserInterface/Views/DetailsSection.js:
(WebInspector.DetailsSection):
Add "options" class name in the base class.
* UserInterface/Views/ProbeDetailsSidebarPanel.css:
(.details-section.probe-set .options > :matches(.probe-remove, .probe-clear-samples, .probe-add)): Deleted.
(.details-section.probe-set .options > .probe-clear-samples): Deleted.
(.details-section.probe-set .options > .probe-remove): Deleted.
(.details-section.probe-set .options > .probe-add): Deleted.
Remove <img> button styles.
* UserInterface/Views/ProbeSetDetailsSection.js:
(WebInspector.ProbeSetDetailsSection):
(WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked.createProbeFromEnteredExpression):
(WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
(WebInspector.ProbeSetDetailsSection.prototype._clearSamplesButtonClicked):
(WebInspector.ProbeSetDetailsSection.prototype._probeSetSamplesChanged):
Update "Clear samples" enabled state.
(WebInspector.ProbeSetDetailsSection.prototype._probeSetHasSamples):
Helper function to check if the probe set is empty.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsProbeSetjs">trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSet.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectioncss">trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectionjs">trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsProbeDetailsSidebarPanelcss">trunk/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsProbeSetDetailsSectionjs">trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (192593 => 192594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-11-18 23:21:38 UTC (rev 192593)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-11-18 23:47:52 UTC (rev 192594)
</span><span class="lines">@@ -1,5 +1,48 @@
</span><span class="cx"> 2015-11-18 Matt Baker <mattbaker@apple.com>
</span><span class="cx">
</span><ins>+ Web Inspector: Probes sidebar panel sections should use NavigationBar
+ https://bugs.webkit.org/show_bug.cgi?id=151373
+
+ Reviewed by Brian Burg.
+
+ Replaces image elements with a NavigationBar instance. The "Clear samples"
+ button is disabled when no samples exist in the probe set.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ New navigation item labels.
+
+ * UserInterface/Models/ProbeSet.js:
+ (WebInspector.ProbeSet.prototype._sampleCollected):
+ Dispatch new event WebInspector.ProbeSet.Event.SampleAdded.
+
+ * UserInterface/Views/DetailsSection.css:
+ (.details-section > .header > .options > .navigation-bar):
+ (.details-section > .header > .options > .navigation-bar > .item):
+ Define consistent style for showing a NavigationBar inside the section header.
+
+ * UserInterface/Views/DetailsSection.js:
+ (WebInspector.DetailsSection):
+ Add "options" class name in the base class.
+
+ * UserInterface/Views/ProbeDetailsSidebarPanel.css:
+ (.details-section.probe-set .options > :matches(.probe-remove, .probe-clear-samples, .probe-add)): Deleted.
+ (.details-section.probe-set .options > .probe-clear-samples): Deleted.
+ (.details-section.probe-set .options > .probe-remove): Deleted.
+ (.details-section.probe-set .options > .probe-add): Deleted.
+ Remove <img> button styles.
+
+ * UserInterface/Views/ProbeSetDetailsSection.js:
+ (WebInspector.ProbeSetDetailsSection):
+ (WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked.createProbeFromEnteredExpression):
+ (WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
+ (WebInspector.ProbeSetDetailsSection.prototype._clearSamplesButtonClicked):
+ (WebInspector.ProbeSetDetailsSection.prototype._probeSetSamplesChanged):
+ Update "Clear samples" enabled state.
+ (WebInspector.ProbeSetDetailsSection.prototype._probeSetHasSamples):
+ Helper function to check if the probe set is empty.
+
+2015-11-18 Matt Baker <mattbaker@apple.com>
+
</ins><span class="cx"> Web Inspector: Watch Expressions details section should use NavigationBar
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=151377
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (192593 => 192594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-11-18 23:21:38 UTC (rev 192593)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2015-11-18 23:47:52 UTC (rev 192594)
</span><span class="lines">@@ -53,6 +53,7 @@
</span><span class="cx"> localizedStrings["Add New Probe Expression"] = "Add New Probe Expression";
</span><span class="cx"> localizedStrings["Add New Watch Expression"] = "Add New Watch Expression";
</span><span class="cx"> localizedStrings["Add new breakpoint action after this action"] = "Add new breakpoint action after this action";
</span><ins>+localizedStrings["Add probe expression"] = "Add probe expression";
</ins><span class="cx"> localizedStrings["Add watch expression"] = "Add watch expression";
</span><span class="cx"> localizedStrings["Additions"] = "Additions";
</span><span class="cx"> localizedStrings["Align"] = "Align";
</span><span class="lines">@@ -116,6 +117,7 @@
</span><span class="cx"> localizedStrings["Clear Log on Navigation"] = "Clear Log on Navigation";
</span><span class="cx"> localizedStrings["Clear Timeline"] = "Clear Timeline";
</span><span class="cx"> localizedStrings["Clear log (%s or %s)"] = "Clear log (%s or %s)";
</span><ins>+localizedStrings["Clear samples"] = "Clear samples";
</ins><span class="cx"> localizedStrings["Clear watch expressions"] = "Clear watch expressions";
</span><span class="cx"> localizedStrings["Click Listener"] = "Click Listener";
</span><span class="cx"> localizedStrings["Click or press the spacebar to record."] = "Click or press the spacebar to record.";
</span><span class="lines">@@ -485,6 +487,7 @@
</span><span class="cx"> localizedStrings["Reload page (%s)\nReload ignoring cache (%s)"] = "Reload page (%s)\nReload ignoring cache (%s)";
</span><span class="cx"> localizedStrings["Removals"] = "Removals";
</span><span class="cx"> localizedStrings["Remove Watch Expression"] = "Remove Watch Expression";
</span><ins>+localizedStrings["Remove probe"] = "Remove probe";
</ins><span class="cx"> localizedStrings["Remove this breakpoint action"] = "Remove this breakpoint action";
</span><span class="cx"> localizedStrings["Rendering Frames"] = "Rendering Frames";
</span><span class="cx"> localizedStrings["Repeat"] = "Repeat";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsProbeSetjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSet.js (192593 => 192594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSet.js        2015-11-18 23:21:38 UTC (rev 192593)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ProbeSet.js        2015-11-18 23:47:52 UTC (rev 192594)
</span><span class="lines">@@ -141,6 +141,7 @@
</span><span class="cx">
</span><span class="cx"> console.assert(this.dataTable);
</span><span class="cx"> this.dataTable.addSampleForProbe(probe, sample);
</span><ins>+ this.dispatchEventToListeners(WebInspector.ProbeSet.Event.SampleAdded, {probe, sample});
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> _breakpointResolvedStateDidChange(event)
</span><span class="lines">@@ -153,5 +154,6 @@
</span><span class="cx"> ProbeAdded: "probe-set-probe-added",
</span><span class="cx"> ProbeRemoved: "probe-set-probe-removed",
</span><span class="cx"> ResolvedStateDidChange: "probe-set-resolved-state-did-change",
</span><ins>+ SampleAdded: "probe-set-sample-added",
</ins><span class="cx"> SamplesCleared: "probe-set-samples-cleared",
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectioncss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css (192593 => 192594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css        2015-11-18 23:21:38 UTC (rev 192593)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.css        2015-11-18 23:47:52 UTC (rev 192594)
</span><span class="lines">@@ -63,6 +63,18 @@
</span><span class="cx"> z-index: 200;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+.details-section > .header > .options > .navigation-bar {
+ margin-top: 1px;
+ height: 100%;
+ float: right;
+ border: none;
+}
+
+.details-section > .header > .options > .navigation-bar > .item {
+ width: 20px;
+ height: 100%;
+}
+
</ins><span class="cx"> .details-section .details-section > .header {
</span><span class="cx"> top: 21px;
</span><span class="cx"> background-color: hsl(0, 0%, 100%);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDetailsSectionjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.js (192593 => 192594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.js        2015-11-18 23:21:38 UTC (rev 192593)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DetailsSection.js        2015-11-18 23:47:52 UTC (rev 192594)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx">
</span><span class="cx"> if (optionsElement instanceof HTMLElement) {
</span><span class="cx"> this._optionsElement = optionsElement;
</span><ins>+ this._optionsElement.classList.add("options");
</ins><span class="cx"> this._optionsElement.addEventListener("mousedown", this._optionsElementMouseDown.bind(this));
</span><span class="cx"> this._optionsElement.addEventListener("mouseup", this._optionsElementMouseUp.bind(this));
</span><span class="cx"> this._headerElement.appendChild(this._optionsElement);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsProbeDetailsSidebarPanelcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.css (192593 => 192594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.css        2015-11-18 23:21:38 UTC (rev 192593)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProbeDetailsSidebarPanel.css        2015-11-18 23:47:52 UTC (rev 192594)
</span><span class="lines">@@ -37,28 +37,6 @@
</span><span class="cx"> display: block;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.details-section.probe-set .options > :matches(.probe-remove, .probe-clear-samples, .probe-add) {
- float: right;
- height: 11px;
- margin-top: 1px;
- margin-left: 5px;
-}
-
-.details-section.probe-set .options > .probe-clear-samples {
- content: url(../Images/NavigationItemTrash.svg);
- height: 14px;
- margin-top: -1px;
-}
-
-.details-section.probe-set .options > .probe-remove {
- content: url(../Images/CloseLarge.svg);
-}
-
-.details-section.probe-set .options > .probe-add {
- content: url(../Images/Plus13.svg);
- height: 13px;
-}
-
</del><span class="cx"> .details-section.probe-set .options > input {
</span><span class="cx"> height: 12px;
</span><span class="cx"> width: 40px;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsProbeSetDetailsSectionjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js (192593 => 192594)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js        2015-11-18 23:21:38 UTC (rev 192593)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProbeSetDetailsSection.js        2015-11-18 23:47:52 UTC (rev 192594)
</span><span class="lines">@@ -31,8 +31,6 @@
</span><span class="cx"> console.assert(probeSet instanceof WebInspector.ProbeSet, "Invalid ProbeSet argument:", probeSet);
</span><span class="cx">
</span><span class="cx"> var optionsElement = document.createElement("div");
</span><del>- optionsElement.classList.add(WebInspector.ProbeSetDetailsSection.SectionOptionsStyleClassName);
-
</del><span class="cx"> var dataGrid = new WebInspector.ProbeSetDataGrid(probeSet);
</span><span class="cx">
</span><span class="cx"> var singletonRow = new WebInspector.DetailsSectionRow;
</span><span class="lines">@@ -50,20 +48,25 @@
</span><span class="cx"> this._probeSet = probeSet;
</span><span class="cx"> this._dataGrid = dataGrid;
</span><span class="cx">
</span><del>- var removeProbeButton = optionsElement.createChild("img");
- removeProbeButton.classList.add(WebInspector.ProbeSetDetailsSection.ProbeRemoveStyleClassName);
- removeProbeButton.classList.add(WebInspector.ProbeSetDetailsSection.ProbeButtonEnabledStyleClassName);
- this._listeners.register(removeProbeButton, "click", this._removeButtonClicked);
</del><ins>+ this._navigationBar = new WebInspector.NavigationBar;
+ this._optionsElement.appendChild(this._navigationBar.element);
</ins><span class="cx">
</span><del>- var clearSamplesButton = optionsElement.createChild("img");
- clearSamplesButton.classList.add(WebInspector.ProbeSetDetailsSection.ProbeClearSamplesStyleClassName);
- clearSamplesButton.classList.add(WebInspector.ProbeSetDetailsSection.ProbeButtonEnabledStyleClassName);
- this._listeners.register(clearSamplesButton, "click", this._clearSamplesButtonClicked);
</del><ins>+ this._addProbeButtonItem = new WebInspector.ButtonNavigationItem("add-probe", WebInspector.UIString("Add probe expression"), "Images/Plus13.svg", 13, 13);
+ this._addProbeButtonItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._addProbeButtonClicked, this);
+ this._navigationBar.addNavigationItem(this._addProbeButtonItem);
</ins><span class="cx">
</span><del>- var addProbeButton = optionsElement.createChild("img");
- addProbeButton.classList.add(WebInspector.ProbeSetDetailsSection.AddProbeValueStyleClassName);
- this._listeners.register(addProbeButton, "click", this._addProbeButtonClicked);
</del><ins>+ this._clearSamplesButtonItem = new WebInspector.ButtonNavigationItem("clear-samples", WebInspector.UIString("Clear samples"), "Images/NavigationItemTrash.svg", 14, 14);
+ this._clearSamplesButtonItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._clearSamplesButtonClicked, this);
+ this._clearSamplesButtonItem.enabled = this._probeSetHasSamples();
+ this._navigationBar.addNavigationItem(this._clearSamplesButtonItem);
</ins><span class="cx">
</span><ins>+ this._removeProbeButtonItem = new WebInspector.ButtonNavigationItem("remove-probe", WebInspector.UIString("Remove probe"), "Images/CloseLarge.svg", 12, 12);
+ this._removeProbeButtonItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._removeProbeButtonClicked, this);
+ this._navigationBar.addNavigationItem(this._removeProbeButtonItem);
+
+ this._listeners.register(this._probeSet, WebInspector.ProbeSet.Event.SampleAdded, this._probeSetSamplesChanged);
+ this._listeners.register(this._probeSet, WebInspector.ProbeSet.Event.SamplesCleared, this._probeSetSamplesChanged);
+
</ins><span class="cx"> // Update the source link when the breakpoint's resolved state changes,
</span><span class="cx"> // so that it can become a live location link when possible.
</span><span class="cx"> this._updateLinkElement();
</span><span class="lines">@@ -111,41 +114,46 @@
</span><span class="cx"> {
</span><span class="cx"> if (event.keyCode !== 13)
</span><span class="cx"> return;
</span><del>- var expression = event.target.value;
</del><ins>+ let expression = event.target.value;
</ins><span class="cx"> this._probeSet.createProbe(expression);
</span><span class="cx"> visiblePopover.dismiss();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- var popover = new WebInspector.Popover;
- var content = document.createElement("div");
</del><ins>+ let popover = new WebInspector.Popover;
+ let content = document.createElement("div");
</ins><span class="cx"> content.classList.add(WebInspector.ProbeSetDetailsSection.ProbePopoverElementStyleClassName);
</span><span class="cx"> content.createChild("div").textContent = WebInspector.UIString("Add New Probe Expression");
</span><del>- var textBox = content.createChild("input");
</del><ins>+ let textBox = content.createChild("input");
</ins><span class="cx"> textBox.addEventListener("keypress", createProbeFromEnteredExpression.bind(this, popover));
</span><span class="cx"> textBox.addEventListener("click", function (event) { event.target.select(); });
</span><span class="cx"> textBox.type = "text";
</span><span class="cx"> textBox.placeholder = WebInspector.UIString("Expression");
</span><span class="cx"> popover.content = content;
</span><del>- var target = WebInspector.Rect.rectFromClientRect(event.target.getBoundingClientRect());
</del><ins>+ let target = WebInspector.Rect.rectFromClientRect(event.target.element.getBoundingClientRect());
</ins><span class="cx"> popover.present(target, [WebInspector.RectEdge.MAX_Y, WebInspector.RectEdge.MIN_Y, WebInspector.RectEdge.MAX_X]);
</span><span class="cx"> textBox.select();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- _removeButtonClicked(event)
</del><ins>+ _clearSamplesButtonClicked(event)
</ins><span class="cx"> {
</span><ins>+ this._probeSet.clearSamples();
+ }
+
+ _removeProbeButtonClicked(event)
+ {
</ins><span class="cx"> this._probeSet.clear();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- _clearSamplesButtonClicked(event)
</del><ins>+ _probeSetSamplesChanged(event)
</ins><span class="cx"> {
</span><del>- this._probeSet.clearSamples();
</del><ins>+ this._clearSamplesButtonItem.enabled = this._probeSetHasSamples();
</ins><span class="cx"> }
</span><ins>+
+ _probeSetHasSamples()
+ {
+ return this._probeSet.probes.some((probe) => probe.samples.length);
+ }
</ins><span class="cx"> };
</span><span class="cx">
</span><del>-WebInspector.ProbeSetDetailsSection.AddProbeValueStyleClassName = "probe-add";
</del><span class="cx"> WebInspector.ProbeSetDetailsSection.DontFloatLinkStyleClassName = "dont-float";
</span><del>-WebInspector.ProbeSetDetailsSection.ProbeButtonEnabledStyleClassName = "enabled";
</del><span class="cx"> WebInspector.ProbeSetDetailsSection.ProbePopoverElementStyleClassName = "probe-popover";
</span><del>-WebInspector.ProbeSetDetailsSection.ProbeClearSamplesStyleClassName = "probe-clear-samples";
-WebInspector.ProbeSetDetailsSection.ProbeRemoveStyleClassName = "probe-remove";
-WebInspector.ProbeSetDetailsSection.SectionOptionsStyleClassName = "options";
</del></span></pre>
</div>
</div>
</body>
</html>