<!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>[198774] 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/198774">198774</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-28 20:28:10 -0700 (Mon, 28 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Ensure maximum accuracy while profiling
https://bugs.webkit.org/show_bug.cgi?id=155809
&lt;rdar://problem/25325035&gt;

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2016-03-28
Reviewed by Timothy Hatcher.

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

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager):
When starting the inspector, if it was previously closed while
breakpoints were temporarily disabled, restore the correct
breakpoints enabled state.

(WebInspector.DebuggerManager.prototype.set breakpointsEnabled):
Warn if we ever try to enable breakpoints during timeline recordings.

(WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
(WebInspector.DebuggerManager.prototype.startDisablingBreakpointsTemporarily):
(WebInspector.DebuggerManager.prototype.stopDisablingBreakpointsTemporarily):
Method to start/stop temporarily disabling breakpoints.

(WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
(WebInspector.DebuggerManager.prototype._setBreakpoint):
When temporarily disabling breakpoints avoid the convenience behavior of
enabling all breakpoints when enabling or setting a single breakpoint.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.startCapturing):
Emit a will start capturing event to do work before enabling instruments.

* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar &gt; .panel.navigation.debugger .timeline-recording-warning):
(.sidebar &gt; .panel.navigation.debugger .timeline-recording-warning &gt; a):
Styles for a warning section in the Debugger Sidebar when the Debugger
is temporarily disabled due to a Timeline recording.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingWillStart):
(WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingStopped):
Modify the Debugger state and UI before and after a Timeline recording.</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="#trunkSourceWebInspectorUIUserInterfaceControllersDebuggerManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPanelcss">trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (198773 => 198774)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-03-29 02:03:22 UTC (rev 198773)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-03-29 03:28:10 UTC (rev 198774)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2016-03-28  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Ensure maximum accuracy while profiling
+        https://bugs.webkit.org/show_bug.cgi?id=155809
+        &lt;rdar://problem/25325035&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        New strings.
+
+        * UserInterface/Controllers/DebuggerManager.js:
+        (WebInspector.DebuggerManager):
+        When starting the inspector, if it was previously closed while
+        breakpoints were temporarily disabled, restore the correct
+        breakpoints enabled state.
+
+        (WebInspector.DebuggerManager.prototype.set breakpointsEnabled):
+        Warn if we ever try to enable breakpoints during timeline recordings.
+
+        (WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
+        (WebInspector.DebuggerManager.prototype.startDisablingBreakpointsTemporarily):
+        (WebInspector.DebuggerManager.prototype.stopDisablingBreakpointsTemporarily):
+        Method to start/stop temporarily disabling breakpoints.
+
+        (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
+        (WebInspector.DebuggerManager.prototype._setBreakpoint):
+        When temporarily disabling breakpoints avoid the convenience behavior of
+        enabling all breakpoints when enabling or setting a single breakpoint.
+
+        * UserInterface/Controllers/TimelineManager.js:
+        (WebInspector.TimelineManager.prototype.startCapturing):
+        Emit a will start capturing event to do work before enabling instruments.
+
+        * UserInterface/Views/DebuggerSidebarPanel.css:
+        (.sidebar &gt; .panel.navigation.debugger .timeline-recording-warning):
+        (.sidebar &gt; .panel.navigation.debugger .timeline-recording-warning &gt; a):
+        Styles for a warning section in the Debugger Sidebar when the Debugger
+        is temporarily disabled due to a Timeline recording.
+
+        * UserInterface/Views/DebuggerSidebarPanel.js:
+        (WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingWillStart):
+        (WebInspector.DebuggerSidebarPanel.prototype._timelineRecordingStopped):
+        Modify the Debugger state and UI before and after a Timeline recording.
+
</ins><span class="cx"> 2016-03-28  Nikita Vasilyev  &lt;nvasilyev@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Use font-variant-numeric: tabular-nums instead of -apple-system-monospaced-numbers
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (198773 => 198774)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-03-29 02:03:22 UTC (rev 198773)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-03-29 03:28:10 UTC (rev 198774)
</span><span class="lines">@@ -215,6 +215,7 @@
</span><span class="cx"> localizedStrings[&quot;Debugger&quot;] = &quot;Debugger&quot;;
</span><span class="cx"> localizedStrings[&quot;Debugger Paused&quot;] = &quot;Debugger Paused&quot;;
</span><span class="cx"> localizedStrings[&quot;Debugger Statement&quot;] = &quot;Debugger Statement&quot;;
</span><ins>+localizedStrings[&quot;Debugger is disabled during a Timeline recording.&quot;] = &quot;Debugger is disabled during a Timeline recording.&quot;;
</ins><span class="cx"> localizedStrings[&quot;Decoded&quot;] = &quot;Decoded&quot;;
</span><span class="cx"> localizedStrings[&quot;Decoration&quot;] = &quot;Decoration&quot;;
</span><span class="cx"> localizedStrings[&quot;Default&quot;] = &quot;Default&quot;;
</span><span class="lines">@@ -683,6 +684,7 @@
</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><span class="cx"> localizedStrings[&quot;Stop recording (%s)&quot;] = &quot;Stop recording (%s)&quot;;
</span><ins>+localizedStrings[&quot;Stop recording.&quot;] = &quot;Stop recording.&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="trunkSourceWebInspectorUIUserInterfaceControllersDebuggerManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js (198773 => 198774)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js        2016-03-29 02:03:22 UTC (rev 198773)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js        2016-03-29 03:28:10 UTC (rev 198774)
</span><span class="lines">@@ -71,6 +71,14 @@
</span><span class="cx">         this._breakpointsSetting = new WebInspector.Setting(&quot;breakpoints&quot;, []);
</span><span class="cx">         this._breakpointsEnabledSetting = new WebInspector.Setting(&quot;breakpoints-enabled&quot;, true);
</span><span class="cx"> 
</span><ins>+        // Restore the correct breakpoints enabled setting if Web Inspector had
+        // previously been left in a state where breakpoints were temporarily disabled.
+        this._temporarilyDisabledBreakpointsRestoreSetting = new WebInspector.Setting(&quot;temporarily-disabled-breakpoints-restore&quot;, null);
+        if (this._temporarilyDisabledBreakpointsRestoreSetting.value !== null) {
+            this._breakpointsEnabledSetting.value = this._temporarilyDisabledBreakpointsRestoreSetting.value;
+            this._temporarilyDisabledBreakpointsRestoreSetting.value = null;
+        }
+
</ins><span class="cx">         if (window.DebuggerAgent)
</span><span class="cx">             DebuggerAgent.setBreakpointsActive(this._breakpointsEnabledSetting.value);
</span><span class="cx"> 
</span><span class="lines">@@ -100,6 +108,10 @@
</span><span class="cx">         if (this._breakpointsEnabledSetting.value === enabled)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><ins>+        console.assert(!(enabled &amp;&amp; this.breakpointsDisabledTemporarily), &quot;Should not enable breakpoints when we are temporarily disabling breakpoints.&quot;);
+        if (enabled &amp;&amp; this.breakpointsDisabledTemporarily)
+            return;
+
</ins><span class="cx">         this._breakpointsEnabledSetting.value = enabled;
</span><span class="cx"> 
</span><span class="cx">         this.dispatchEventToListeners(WebInspector.DebuggerManager.Event.BreakpointsEnabledDidChange);
</span><span class="lines">@@ -335,6 +347,34 @@
</span><span class="cx">         return knownScripts;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    get breakpointsDisabledTemporarily()
+    {
+        return this._temporarilyDisabledBreakpointsRestoreSetting.value !== null;
+    }
+
+    startDisablingBreakpointsTemporarily()
+    {
+        console.assert(this._temporarilyDisabledBreakpointsRestoreSetting.value === null, &quot;Already temporarily disabling breakpoints.&quot;);
+        if (this._temporarilyDisabledBreakpointsRestoreSetting.value !== null)
+            return;
+
+        this._temporarilyDisabledBreakpointsRestoreSetting.value = this._breakpointsEnabledSetting.value;
+
+        this.breakpointsEnabled = false;
+    }
+
+    stopDisablingBreakpointsTemporarily()
+    {
+        console.assert(this._temporarilyDisabledBreakpointsRestoreSetting.value !== null, &quot;Was not temporarily disabling breakpoints.&quot;);
+        if (this._temporarilyDisabledBreakpointsRestoreSetting.value === null)
+            return;
+
+        let restoreState = this._temporarilyDisabledBreakpointsRestoreSetting.value;
+        this._temporarilyDisabledBreakpointsRestoreSetting.value = null;
+
+        this.breakpointsEnabled = restoreState;
+    }
+
</ins><span class="cx">     addBreakpoint(breakpoint, skipEventDispatch, shouldSpeculativelyResolve)
</span><span class="cx">     {
</span><span class="cx">         console.assert(breakpoint instanceof WebInspector.Breakpoint, &quot;Bad argument to DebuggerManger.addBreakpoint: &quot;, breakpoint);
</span><span class="lines">@@ -687,7 +727,7 @@
</span><span class="cx">         if (breakpoint.identifier || breakpoint.disabled)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        if (!this._restoringBreakpoints) {
</del><ins>+        if (!this._restoringBreakpoints &amp;&amp; !this.breakpointsDisabledTemporarily) {
</ins><span class="cx">             // Enable breakpoints since a breakpoint is being set. This eliminates
</span><span class="cx">             // a multi-step process for the user that can be confusing.
</span><span class="cx">             this.breakpointsEnabled = true;
</span><span class="lines">@@ -800,7 +840,7 @@
</span><span class="cx"> 
</span><span class="cx">         let breakpoint = event.target;
</span><span class="cx">         if (breakpoint === this._allExceptionsBreakpoint) {
</span><del>-            if (!breakpoint.disabled)
</del><ins>+            if (!breakpoint.disabled &amp;&amp; !this.breakpointsDisabledTemporarily)
</ins><span class="cx">                 this.breakpointsEnabled = true;
</span><span class="cx">             this._allExceptionsBreakpointEnabledSetting.value = !breakpoint.disabled;
</span><span class="cx">             this._updateBreakOnExceptionsState();
</span><span class="lines">@@ -808,7 +848,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (breakpoint === this._allUncaughtExceptionsBreakpoint) {
</span><del>-            if (!breakpoint.disabled)
</del><ins>+            if (!breakpoint.disabled &amp;&amp; !this.breakpointsDisabledTemporarily)
</ins><span class="cx">                 this.breakpointsEnabled = true;
</span><span class="cx">             this._allUncaughtExceptionsBreakpointEnabledSetting.value = !breakpoint.disabled;
</span><span class="cx">             this._updateBreakOnExceptionsState();
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (198773 => 198774)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2016-03-29 02:03:22 UTC (rev 198773)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2016-03-29 03:28:10 UTC (rev 198774)
</span><span class="lines">@@ -158,6 +158,8 @@
</span><span class="cx">         if (!this._activeRecording || shouldCreateRecording)
</span><span class="cx">             this._loadNewRecording();
</span><span class="cx"> 
</span><ins>+        this.dispatchEventToListeners(WebInspector.TimelineManager.Event.CapturingWillStart);
+
</ins><span class="cx">         this._activeRecording.start();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -866,6 +868,7 @@
</span><span class="cx"> WebInspector.TimelineManager.Event = {
</span><span class="cx">     RecordingCreated: &quot;timeline-manager-recording-created&quot;,
</span><span class="cx">     RecordingLoaded: &quot;timeline-manager-recording-loaded&quot;,
</span><ins>+    CapturingWillStart: &quot;timeline-manager-capturing-will-start&quot;,
</ins><span class="cx">     CapturingStarted: &quot;timeline-manager-capturing-started&quot;,
</span><span class="cx">     CapturingStopped: &quot;timeline-manager-capturing-stopped&quot;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPanelcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css (198773 => 198774)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css        2016-03-29 02:03:22 UTC (rev 198773)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css        2016-03-29 03:28:10 UTC (rev 198774)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> .sidebar &gt; .panel.navigation.debugger &gt; :matches(.content, .empty-content-placeholder) {
</span><span class="cx">     top: 29px;
</span><span class="cx"> }
</span><span class="lines">@@ -35,6 +34,22 @@
</span><span class="cx">     right: 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.sidebar &gt; .panel.navigation.debugger .timeline-recording-warning {
+    text-align: center;
+    font-size: 11px;
+
+    padding: 11px 6px;
+    margin-bottom: 6px;
+
+    border-bottom: 1px solid var(--border-color);
+    background-color: hsl(50, 100%, 94%);
+}
+
+.sidebar &gt; .panel.navigation.debugger .timeline-recording-warning &gt; a {
+    text-decoration: underline;
+    cursor: pointer;
+}
+
</ins><span class="cx"> .sidebar &gt; .panel.navigation.debugger .details-section {
</span><span class="cx">     font-size: 11px;
</span><span class="cx"> }
</span><span class="lines">@@ -47,7 +62,6 @@
</span><span class="cx">     display: none;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> .sidebar &gt; .panel.navigation.debugger .details-section &gt; .content &gt; .group {
</span><span class="cx">     display: block;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (198773 => 198774)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js        2016-03-29 02:03:22 UTC (rev 198773)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js        2016-03-29 03:28:10 UTC (rev 198774)
</span><span class="lines">@@ -46,6 +46,16 @@
</span><span class="cx">         WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.ActiveCallFrameDidChange, this._debuggerActiveCallFrameDidChange, this);
</span><span class="cx">         WebInspector.debuggerManager.addEventListener(WebInspector.DebuggerManager.Event.WaitingToPause, this._debuggerWaitingToPause, this);
</span><span class="cx"> 
</span><ins>+        WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingWillStart, this._timelineRecordingWillStart, this);
+        WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStopped, this._timelineRecordingStopped, this);        
+
+        this._timelineRecordingWarningElement = document.createElement(&quot;div&quot;);
+        this._timelineRecordingWarningElement.classList.add(&quot;timeline-recording-warning&quot;);
+        this._timelineRecordingWarningElement.append(WebInspector.UIString(&quot;Debugger is disabled during a Timeline recording.&quot;), &quot; &quot;);
+        let stopRecordingLink = this._timelineRecordingWarningElement.appendChild(document.createElement(&quot;a&quot;));
+        stopRecordingLink.textContent = WebInspector.UIString(&quot;Stop recording.&quot;);
+        stopRecordingLink.addEventListener(&quot;click&quot;, () =&gt; { WebInspector.timelineManager.stopCapturing(); });
+
</ins><span class="cx">         this._navigationBar = new WebInspector.NavigationBar;
</span><span class="cx">         this.addSubview(this._navigationBar);
</span><span class="cx"> 
</span><span class="lines">@@ -387,6 +397,29 @@
</span><span class="cx">         this._addIssuesForSourceCode(resource);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    _timelineRecordingWillStart(event)
+    {
+        WebInspector.debuggerManager.startDisablingBreakpointsTemporarily();
+
+        if (WebInspector.debuggerManager.paused)
+            WebInspector.debuggerManager.resume();
+
+        this._debuggerBreakpointsButtonItem.enabled = false;
+        this._debuggerPauseResumeButtonItem.enabled = false;
+
+        this.contentView.element.insertBefore(this._timelineRecordingWarningElement, this.contentView.element.firstChild);
+    }
+
+    _timelineRecordingStopped(event)
+    {
+        WebInspector.debuggerManager.stopDisablingBreakpointsTemporarily();
+
+        this._debuggerBreakpointsButtonItem.enabled = true;
+        this._debuggerPauseResumeButtonItem.enabled = true;
+
+        this._timelineRecordingWarningElement.remove();
+    }
+
</ins><span class="cx">     _scriptAdded(event)
</span><span class="cx">     {
</span><span class="cx">         this._addScript(event.data.script);
</span></span></pre>
</div>
</div>

</body>
</html>