<!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>[194936] 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/194936">194936</a></dd>
<dt>Author</dt> <dd>mattbaker@apple.com</dd>
<dt>Date</dt> <dd>2016-01-12 17:14:14 -0800 (Tue, 12 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Timeline recording controls should use NavigationBar
https://bugs.webkit.org/show_bug.cgi?id=152997

Reviewed by Brian Burg.

NavigtaionBar should always be preferred over manually editing the DOM.
Reusing existing button types for the record button and status element lets us
eliminate a bunch of CSS, and will make future changes to the Timelines UI
(such as adding addition recording controls), easier to implement.

* Localizations/en.lproj/localizedStrings.js:
New tooltip strings.

* UserInterface/Views/TimelineSidebarPanel.css:
(.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop):
(.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop:hover):
(.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop:active):
Replaced similar styles used for the record glyph.
(.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop *):
Prevent multiple mouseover/mouseout events while hovering the navigation item.
(.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.flexible-space):
Replaced similar styles used for the record status element.
(.sidebar &gt; .panel.navigation.timeline &gt; .status-bar): Deleted.
(body.window-inactive .sidebar &gt; .panel.navigation.timeline &gt; .status-bar): Deleted.
(.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph): Deleted.
(.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph:hover): Deleted.
(.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph:active): Deleted.
(.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph.recording): Deleted.
(.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-status): Deleted.
(.panel.timeline .navigation-bar.timelines-view): Deleted.
No longer used.

* UserInterface/Views/TimelineSidebarPanel.js:
Removed unused CSS static variables.
(WebInspector.TimelineSidebarPanel):
Create navigation bar, remove status bar DOM elements. Create keyboard shortcut
before the record button, so the shortcut's display name can be used in tooltips.
(WebInspector.TimelineSidebarPanel.prototype._capturingStartedOrStopped):
Update record button state and flexible space (status) text.
(WebInspector.TimelineSidebarPanel.prototype._recordButtonClicked):
Toggle recording state, and update record button state and flexible space (status) text.
(WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOver):
(WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOut):
Update flexible space (status) text.
(WebInspector.TimelineSidebarPanel.prototype._updateRecordButton):
(WebInspector.TimelineSidebarPanel.prototype._updateReplayInterfaceVisibility):
(WebInspector.TimelineSidebarPanel.prototype._toggleRecording): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._capturingStarted): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._capturingStopped): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOver): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOut): Deleted.
(WebInspector.TimelineSidebarPanel.prototype._recordGlyphClicked): Deleted.
No longer used.</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="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPanelcss">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (194935 => 194936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-01-13 01:05:20 UTC (rev 194935)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-01-13 01:14:14 UTC (rev 194936)
</span><span class="lines">@@ -1,5 +1,61 @@
</span><span class="cx"> 2016-01-12  Matt Baker  &lt;mattbaker@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Timeline recording controls should use NavigationBar
+        https://bugs.webkit.org/show_bug.cgi?id=152997
+
+        Reviewed by Brian Burg.
+
+        NavigtaionBar should always be preferred over manually editing the DOM.
+        Reusing existing button types for the record button and status element lets us
+        eliminate a bunch of CSS, and will make future changes to the Timelines UI
+        (such as adding addition recording controls), easier to implement.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        New tooltip strings.
+
+        * UserInterface/Views/TimelineSidebarPanel.css:
+        (.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop):
+        (.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop:hover):
+        (.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop:active):
+        Replaced similar styles used for the record glyph.
+        (.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop *):
+        Prevent multiple mouseover/mouseout events while hovering the navigation item.
+        (.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.flexible-space):
+        Replaced similar styles used for the record status element.
+        (.sidebar &gt; .panel.navigation.timeline &gt; .status-bar): Deleted.
+        (body.window-inactive .sidebar &gt; .panel.navigation.timeline &gt; .status-bar): Deleted.
+        (.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph): Deleted.
+        (.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph:hover): Deleted.
+        (.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph:active): Deleted.
+        (.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph.recording): Deleted.
+        (.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-status): Deleted.
+        (.panel.timeline .navigation-bar.timelines-view): Deleted.
+        No longer used.
+
+        * UserInterface/Views/TimelineSidebarPanel.js:
+        Removed unused CSS static variables.
+        (WebInspector.TimelineSidebarPanel):
+        Create navigation bar, remove status bar DOM elements. Create keyboard shortcut
+        before the record button, so the shortcut's display name can be used in tooltips.
+        (WebInspector.TimelineSidebarPanel.prototype._capturingStartedOrStopped):
+        Update record button state and flexible space (status) text.
+        (WebInspector.TimelineSidebarPanel.prototype._recordButtonClicked):
+        Toggle recording state, and update record button state and flexible space (status) text.
+        (WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOver):
+        (WebInspector.TimelineSidebarPanel.prototype._recordButtonMousedOut):
+        Update flexible space (status) text.
+        (WebInspector.TimelineSidebarPanel.prototype._updateRecordButton):
+        (WebInspector.TimelineSidebarPanel.prototype._updateReplayInterfaceVisibility):
+        (WebInspector.TimelineSidebarPanel.prototype._toggleRecording): Deleted.
+        (WebInspector.TimelineSidebarPanel.prototype._capturingStarted): Deleted.
+        (WebInspector.TimelineSidebarPanel.prototype._capturingStopped): Deleted.
+        (WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOver): Deleted.
+        (WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOut): Deleted.
+        (WebInspector.TimelineSidebarPanel.prototype._recordGlyphClicked): Deleted.
+        No longer used.
+
+2016-01-12  Matt Baker  &lt;mattbaker@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: Move helper methods for getting icons/text to TimelineTabContentView
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=152996
</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 (194935 => 194936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-01-13 01:05:20 UTC (rev 194935)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-01-13 01:14:14 UTC (rev 194936)
</span><span class="lines">@@ -65,8 +65,8 @@
</span><span class="cx"> localizedStrings[&quot;All Resources&quot;] = &quot;All Resources&quot;;
</span><span class="cx"> localizedStrings[&quot;All Storage&quot;] = &quot;All Storage&quot;;
</span><span class="cx"> localizedStrings[&quot;All Uncaught Exceptions&quot;] = &quot;All Uncaught Exceptions&quot;;
</span><ins>+localizedStrings[&quot;An error occurred trying to load the resource.&quot;] = &quot;An error occurred trying to load the resource.&quot;;
</ins><span class="cx"> localizedStrings[&quot;An error occurred trying to read the  %s  table.&quot;] = &quot;An error occurred trying to read the  %s  table.&quot;;
</span><del>-localizedStrings[&quot;An error occurred trying to load the resource.&quot;] = &quot;An error occurred trying to load the resource.&quot;;
</del><span class="cx"> localizedStrings[&quot;An unexpected error %s occurred.&quot;] = &quot;An unexpected error %s occurred.&quot;;
</span><span class="cx"> localizedStrings[&quot;An unexpected error occurred.&quot;] = &quot;An unexpected error occurred.&quot;;
</span><span class="cx"> localizedStrings[&quot;Angle&quot;] = &quot;Angle&quot;;
</span><span class="lines">@@ -124,8 +124,6 @@
</span><span class="cx"> localizedStrings[&quot;Clear samples&quot;] = &quot;Clear samples&quot;;
</span><span class="cx"> localizedStrings[&quot;Clear watch expressions&quot;] = &quot;Clear watch expressions&quot;;
</span><span class="cx"> localizedStrings[&quot;Click Listener&quot;] = &quot;Click Listener&quot;;
</span><del>-localizedStrings[&quot;Click or press the spacebar to record.&quot;] = &quot;Click or press the spacebar to record.&quot;;
-localizedStrings[&quot;Click or press the spacebar to stop recording.&quot;] = &quot;Click or press the spacebar to stop recording.&quot;;
</del><span class="cx"> localizedStrings[&quot;Click to add a new rule.&quot;] = &quot;Click to add a new rule.&quot;;
</span><span class="cx"> localizedStrings[&quot;Click to clear modified properties&quot;] = &quot;Click to clear modified properties&quot;;
</span><span class="cx"> localizedStrings[&quot;Click to close this tab&quot;] = &quot;Click to close this tab&quot;;
</span><span class="lines">@@ -602,6 +600,7 @@
</span><span class="cx"> localizedStrings[&quot;Start Playback&quot;] = &quot;Start Playback&quot;;
</span><span class="cx"> localizedStrings[&quot;Start Recording&quot;] = &quot;Start Recording&quot;;
</span><span class="cx"> localizedStrings[&quot;Start Time&quot;] = &quot;Start Time&quot;;
</span><ins>+localizedStrings[&quot;Start recording (%s)\nCreate new recording (%s)&quot;] = &quot;Start recording (%s)\nCreate new recording (%s)&quot;;
</ins><span class="cx"> localizedStrings[&quot;State&quot;] = &quot;State&quot;;
</span><span class="cx"> localizedStrings[&quot;Status&quot;] = &quot;Status&quot;;
</span><span class="cx"> localizedStrings[&quot;Step&quot;] = &quot;Step&quot;;
</span><span class="lines">@@ -609,6 +608,7 @@
</span><span class="cx"> localizedStrings[&quot;Step out (%s or %s)&quot;] = &quot;Step out (%s or %s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Step over (%s or %s)&quot;] = &quot;Step over (%s or %s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Stop Recording&quot;] = &quot;Stop Recording&quot;;
</span><ins>+localizedStrings[&quot;Stop recording (%s)&quot;] = &quot;Stop recording (%s)&quot;;
</ins><span class="cx"> localizedStrings[&quot;Storage&quot;] = &quot;Storage&quot;;
</span><span class="cx"> localizedStrings[&quot;Style&quot;] = &quot;Style&quot;;
</span><span class="cx"> localizedStrings[&quot;Style Attribute&quot;] = &quot;Style Attribute&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPanelcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.css (194935 => 194936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.css        2016-01-13 01:05:20 UTC (rev 194935)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.css        2016-01-13 01:14:14 UTC (rev 194936)
</span><span class="lines">@@ -23,65 +23,26 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-.sidebar &gt; .panel.navigation.timeline &gt; .status-bar {
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    height: 29px;
-    border-bottom: 1px solid hsl(0, 0%, 70%);
-}
-
-body.window-inactive .sidebar &gt; .panel.navigation.timeline &gt; .status-bar {
-    border-bottom-color: hsl(0, 0%, 85%);
-}
-
-.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph {
-    position: absolute;
-    top: 3px;
-    left: 5px;
-    width: 21px;
-    height: 21px;
-    padding: 0;
-    border: none;
-    outline: none;
-    color: transparent;
-    overflow: hidden;
-
-    -webkit-appearance: none;
-
-    background-color: transparent;
-    background-repeat: no-repeat;
-    background-image: url(../Images/Record.svg);
-    background-size: 13px 13px;
-    background-position: center;
-}
-
-.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph {
</del><ins>+.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop {
</ins><span class="cx">     /* Workaround for background image clipping issue on non-retina machines. See http://webkit.org/b/147346. */
</span><span class="cx">     filter: brightness(100%);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph:hover {
</del><ins>+.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop:hover {
</ins><span class="cx">     filter: brightness(95%);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph:active {
</del><ins>+.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop:active {
</ins><span class="cx">     filter: brightness(80%);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-glyph.recording {
-    background-image: url(../Images/Stop.svg);
</del><ins>+.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.record-start-stop * {
+    pointer-events: none;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-.sidebar &gt; .panel.navigation.timeline &gt; .status-bar &gt; .record-status {
-    position: absolute;
-    top: 3px;
-    right: 21px;
-    left: 27px;
</del><ins>+.sidebar &gt; .panel.navigation.timeline &gt; .navigation-bar &gt; .item.flexible-space {
+    justify-content: center;
</ins><span class="cx"> 
</span><del>-    text-align: center;
-
</del><span class="cx">     line-height: 20px;
</span><span class="cx">     font-weight: bold;
</span><span class="cx"> 
</span><span class="lines">@@ -89,10 +50,6 @@
</span><span class="cx">     text-shadow: hsla(0, 0%, 100%, 0.5) 0 1px 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.panel.timeline .navigation-bar.timelines-view {
-    justify-content: flex-end;
-}
-
</del><span class="cx"> .sidebar &gt; .panel.navigation.timeline &gt; .title-bar {
</span><span class="cx">     position: absolute;
</span><span class="cx">     left: 0;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsTimelineSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js (194935 => 194936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js        2016-01-13 01:05:20 UTC (rev 194935)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineSidebarPanel.js        2016-01-13 01:14:14 UTC (rev 194936)
</span><span class="lines">@@ -115,30 +115,37 @@
</span><span class="cx">             this._timelinesContentContainerElement.appendChild(this._frameSelectionChartSection.element);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        var statusBarElement = this._statusBarElement = document.createElement(&quot;div&quot;);
-        statusBarElement.classList.add(WebInspector.TimelineSidebarPanel.StatusBarStyleClass);
-        this.element.insertBefore(statusBarElement, this.element.firstChild);
</del><ins>+        this._toggleRecordingShortcut = new WebInspector.KeyboardShortcut(null, WebInspector.KeyboardShortcut.Key.Space, this._toggleRecordingOnSpacebar.bind(this));
+        this._toggleRecordingShortcut.implicitlyPreventsDefault = false;
+        this._toggleRecordingShortcut.disabled = true;
</ins><span class="cx"> 
</span><del>-        this._recordGlyphElement = document.createElement(&quot;div&quot;);
-        this._recordGlyphElement.className = WebInspector.TimelineSidebarPanel.RecordGlyphStyleClass;
-        this._recordGlyphElement.title = WebInspector.UIString(&quot;Click or press the spacebar to record.&quot;)
-        this._recordGlyphElement.addEventListener(&quot;mouseover&quot;, this._recordGlyphMousedOver.bind(this));
-        this._recordGlyphElement.addEventListener(&quot;mouseout&quot;, this._recordGlyphMousedOut.bind(this));
-        this._recordGlyphElement.addEventListener(&quot;click&quot;, this._recordGlyphClicked.bind(this));
-        statusBarElement.appendChild(this._recordGlyphElement);
</del><ins>+        this._toggleNewRecordingShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Shift, WebInspector.KeyboardShortcut.Key.Space, this._toggleNewRecordingOnSpacebar.bind(this));
+        this._toggleNewRecordingShortcut.implicitlyPreventsDefault = false;
+        this._toggleNewRecordingShortcut.disabled = true;
</ins><span class="cx"> 
</span><del>-        this._recordStatusElement = document.createElement(&quot;div&quot;);
-        this._recordStatusElement.className = WebInspector.TimelineSidebarPanel.RecordStatusStyleClass;
-        statusBarElement.appendChild(this._recordStatusElement);
</del><ins>+        this._recordingNavigationBar = new WebInspector.NavigationBar;
+        this.element.insertBefore(this._recordingNavigationBar.element, this.element.firstChild);
</ins><span class="cx"> 
</span><ins>+        let toolTip = WebInspector.UIString(&quot;Start recording (%s)\nCreate new recording (%s)&quot;).format(this._toggleRecordingShortcut.displayName, this._toggleNewRecordingShortcut.displayName);
+        let altToolTip = WebInspector.UIString(&quot;Stop recording (%s)&quot;).format(this._toggleRecordingShortcut.displayName);
+
+        this._recordButton = new WebInspector.ToggleButtonNavigationItem(&quot;record-start-stop&quot;, toolTip, altToolTip, &quot;Images/Record.svg&quot;, &quot;Images/Stop.svg&quot;, 13, 13);
+        this._recordButton.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._recordButtonClicked, this);
+        this._recordButton.element.addEventListener(&quot;mouseover&quot;, this._recordButtonMousedOver.bind(this));
+        this._recordButton.element.addEventListener(&quot;mouseout&quot;, this._recordButtonMousedOut.bind(this));
+        this._recordingNavigationBar.addNavigationItem(this._recordButton);
+
+        this._recordingStatusItem = new WebInspector.FlexibleSpaceNavigationItem;
+        this._recordingNavigationBar.addNavigationItem(this._recordingStatusItem);
+
</ins><span class="cx">         WebInspector.showReplayInterfaceSetting.addEventListener(WebInspector.Setting.Event.Changed, this._updateReplayInterfaceVisibility, this);
</span><span class="cx"> 
</span><span class="cx">         // We always create a replay navigation bar; its visibility is controlled by WebInspector.showReplayInterfaceSetting.
</span><span class="cx">         this._replayNavigationBar = new WebInspector.NavigationBar;
</span><span class="cx">         this.element.appendChild(this._replayNavigationBar.element);
</span><span class="cx"> 
</span><del>-        var toolTip = WebInspector.UIString(&quot;Begin Capturing&quot;);
-        var altToolTip = WebInspector.UIString(&quot;End Capturing&quot;);
</del><ins>+        toolTip = WebInspector.UIString(&quot;Begin Capturing&quot;);
+        altToolTip = WebInspector.UIString(&quot;End Capturing&quot;);
</ins><span class="cx">         this._replayCaptureButtonItem = new WebInspector.ActivateButtonNavigationItem(&quot;replay-capture&quot;, toolTip, altToolTip, &quot;Images/Circle.svg&quot;, 16, 16);
</span><span class="cx">         this._replayCaptureButtonItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._replayCaptureButtonClicked, this);
</span><span class="cx">         this._replayCaptureButtonItem.enabled = true;
</span><span class="lines">@@ -154,7 +161,7 @@
</span><span class="cx">         WebInspector.replayManager.addEventListener(WebInspector.ReplayManager.Event.CaptureStarted, this._captureStarted, this);
</span><span class="cx">         WebInspector.replayManager.addEventListener(WebInspector.ReplayManager.Event.CaptureStopped, this._captureStopped, this);
</span><span class="cx"> 
</span><del>-        this._statusBarElement.oncontextmenu = this._contextMenuNavigationBarOrStatusBar.bind(this);
</del><ins>+        this._recordingNavigationBar.element.oncontextmenu = this._contextMenuNavigationBarOrStatusBar.bind(this);
</ins><span class="cx">         this._replayNavigationBar.element.oncontextmenu = this._contextMenuNavigationBarOrStatusBar.bind(this);
</span><span class="cx">         this._updateReplayInterfaceVisibility();
</span><span class="cx"> 
</span><span class="lines">@@ -162,8 +169,8 @@
</span><span class="cx">         WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.RecordingLoaded, this._recordingLoaded, this);
</span><span class="cx"> 
</span><span class="cx">         this.contentBrowser.addEventListener(WebInspector.ContentBrowser.Event.CurrentContentViewDidChange, this._contentBrowserCurrentContentViewDidChange, this);
</span><del>-        WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStarted, this._capturingStarted, this);
-        WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStopped, this._capturingStopped, this);
</del><ins>+        WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStarted, this._capturingStartedOrStopped, this);
+        WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStopped, this._capturingStartedOrStopped, this);
</ins><span class="cx"> 
</span><span class="cx">         for (var recording of WebInspector.timelineManager.recordings)
</span><span class="cx">             this._addRecording(recording);
</span><span class="lines">@@ -172,14 +179,6 @@
</span><span class="cx"> 
</span><span class="cx">         if (WebInspector.timelineManager.activeRecording)
</span><span class="cx">             this._recordingLoaded();
</span><del>-
-        this._toggleRecordingShortcut = new WebInspector.KeyboardShortcut(null, WebInspector.KeyboardShortcut.Key.Space, this._toggleRecordingOnSpacebar.bind(this));
-        this._toggleRecordingShortcut.implicitlyPreventsDefault = false;
-        this._toggleRecordingShortcut.disabled = true;
-
-        this._toggleNewRecordingShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Shift, WebInspector.KeyboardShortcut.Key.Space, this._toggleNewRecordingOnSpacebar.bind(this));
-        this._toggleNewRecordingShortcut.implicitlyPreventsDefault = false;
-        this._toggleNewRecordingShortcut.disabled = true;
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="lines">@@ -552,14 +551,10 @@
</span><span class="cx">     {
</span><span class="cx">         if (WebInspector.timelineManager.isCapturing()) {
</span><span class="cx">             WebInspector.timelineManager.stopCapturing();
</span><del>-
-            this._recordGlyphElement.title = WebInspector.UIString(&quot;Click or press the spacebar to record.&quot;)
</del><span class="cx">         } else {
</span><span class="cx">             WebInspector.timelineManager.startCapturing(shouldCreateRecording);
</span><span class="cx">             // Show the timeline to which events will be appended.
</span><span class="cx">             this._recordingLoaded();
</span><del>-
-            this._recordGlyphElement.title = WebInspector.UIString(&quot;Click or press the spacebar to stop recording.&quot;)
</del><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -635,18 +630,12 @@
</span><span class="cx">             this._refreshFrameSelectionChart();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _capturingStarted(event)
</del><ins>+    _capturingStartedOrStopped(event)
</ins><span class="cx">     {
</span><del>-        this._recordStatusElement.textContent = WebInspector.UIString(&quot;Recording&quot;);
-        this._recordGlyphElement.classList.add(WebInspector.TimelineSidebarPanel.RecordGlyphRecordingStyleClass);
</del><ins>+        let isCapturing = WebInspector.timelineManager.isCapturing();
+        this._updateRecordButton(isCapturing);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _capturingStopped(event)
-    {
-        this._recordStatusElement.textContent = &quot;&quot;;
-        this._recordGlyphElement.classList.remove(WebInspector.TimelineSidebarPanel.RecordGlyphRecordingStyleClass);
-    }
-
</del><span class="cx">     _recordingCreated(event)
</span><span class="cx">     {
</span><span class="cx">         this._addRecording(event.data.recording)
</span><span class="lines">@@ -844,32 +833,34 @@
</span><span class="cx">         this.contentView.element.style.top = (overviewHeight + contentElementOffset) + &quot;px&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _recordGlyphMousedOver(event)
</del><ins>+    _recordButtonClicked(event)
</ins><span class="cx">     {
</span><del>-        this._recordGlyphElement.classList.remove(WebInspector.TimelineSidebarPanel.RecordGlyphRecordingForcedStyleClass);
</del><ins>+        let isCapturing = !WebInspector.timelineManager.isCapturing();
</ins><span class="cx"> 
</span><ins>+        this._updateRecordButton(isCapturing);
+        this._toggleRecording(event.shiftKey);
+    }
+
+    _recordButtonMousedOver(event)
+    {
</ins><span class="cx">         if (WebInspector.timelineManager.isCapturing())
</span><del>-            this._recordStatusElement.textContent = WebInspector.UIString(&quot;Stop Recording&quot;);
</del><ins>+            this._recordingStatusItem.element.textContent = WebInspector.UIString(&quot;Stop Recording&quot;);
</ins><span class="cx">         else
</span><del>-            this._recordStatusElement.textContent = WebInspector.UIString(&quot;Start Recording&quot;);
</del><ins>+            this._recordingStatusItem.element.textContent = WebInspector.UIString(&quot;Start Recording&quot;);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _recordGlyphMousedOut(event)
</del><ins>+    _recordButtonMousedOut(event)
</ins><span class="cx">     {
</span><del>-        this._recordGlyphElement.classList.remove(WebInspector.TimelineSidebarPanel.RecordGlyphRecordingForcedStyleClass);
-
</del><span class="cx">         if (WebInspector.timelineManager.isCapturing())
</span><del>-            this._recordStatusElement.textContent = WebInspector.UIString(&quot;Recording&quot;);
</del><ins>+            this._recordingStatusItem.element.textContent = WebInspector.UIString(&quot;Recording&quot;);
</ins><span class="cx">         else
</span><del>-            this._recordStatusElement.textContent = &quot;&quot;;
</del><ins>+            this._recordingStatusItem.element.textContent = &quot;&quot;;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    _recordGlyphClicked(event)
</del><ins>+    _updateRecordButton(isCapturing)
</ins><span class="cx">     {
</span><del>-        // Add forced class to prevent the glyph from showing a confusing status after click.
-        this._recordGlyphElement.classList.add(WebInspector.TimelineSidebarPanel.RecordGlyphRecordingForcedStyleClass);
-
-        this._toggleRecording(event.shiftKey);
</del><ins>+        this._recordingStatusItem.element.textContent = isCapturing ? WebInspector.UIString(&quot;Recording&quot;) : &quot;&quot;;
+        this._recordButton.toggled = isCapturing;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     _viewModeSelected(event)
</span><span class="lines">@@ -995,7 +986,7 @@
</span><span class="cx">     {
</span><span class="cx">         var shouldShowReplayInterface = !!(window.ReplayAgent &amp;&amp; WebInspector.showReplayInterfaceSetting.value);
</span><span class="cx"> 
</span><del>-        this._statusBarElement.classList.toggle(WebInspector.TimelineSidebarPanel.HiddenStyleClassName, shouldShowReplayInterface);
</del><ins>+        this._recordingNavigationBar.element.classList.toggle(WebInspector.TimelineSidebarPanel.HiddenStyleClassName, shouldShowReplayInterface);
</ins><span class="cx">         this._replayNavigationBar.element.classList.toggle(WebInspector.TimelineSidebarPanel.HiddenStyleClassName, !shouldShowReplayInterface);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1068,11 +1059,6 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.TimelineSidebarPanel.HiddenStyleClassName = &quot;hidden&quot;;
</span><del>-WebInspector.TimelineSidebarPanel.StatusBarStyleClass = &quot;status-bar&quot;;
-WebInspector.TimelineSidebarPanel.RecordGlyphStyleClass = &quot;record-glyph&quot;;
-WebInspector.TimelineSidebarPanel.RecordGlyphRecordingStyleClass = &quot;recording&quot;;
-WebInspector.TimelineSidebarPanel.RecordGlyphRecordingForcedStyleClass = &quot;forced&quot;;
-WebInspector.TimelineSidebarPanel.RecordStatusStyleClass = &quot;record-status&quot;;
</del><span class="cx"> WebInspector.TimelineSidebarPanel.TitleBarStyleClass = &quot;title-bar&quot;;
</span><span class="cx"> WebInspector.TimelineSidebarPanel.TitleBarTextStyleClass = &quot;title-bar-text&quot;;
</span><span class="cx"> WebInspector.TimelineSidebarPanel.TitleBarScopeBarStyleClass = &quot;title-bar-scope-bar&quot;;
</span></span></pre>
</div>
</div>

</body>
</html>