<!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>[205651] 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/205651">205651</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-09-08 10:37:53 -0700 (Thu, 08 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Debugger sidebar should include a warning message breakpoints are disabled
https://bugs.webkit.org/show_bug.cgi?id=156719
<rdar://problem/25787932>
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-09-08
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
New strings for breakpoints disabled warning banner.
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger .warning-banner):
(.sidebar > .panel.navigation.debugger .warning-banner > a):
Generalize the class name to "warning-banner".
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointsEnabledDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingWillStart):
(WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingStopped):
(WebInspector.DebuggerSidebarPanel.prototype._updateBreakpointsDisabledBanner):
Show / hide a breakpoints disabled warning banner as needed.
Only one banner shows at a time, so either the timing warning
or the generic breakpoints disabled banner will show.</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="#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 (205650 => 205651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-09-08 17:23:30 UTC (rev 205650)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-09-08 17:37:53 UTC (rev 205651)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2016-09-08 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Debugger sidebar should include a warning message breakpoints are disabled
+ https://bugs.webkit.org/show_bug.cgi?id=156719
+ <rdar://problem/25787932>
+
+ Reviewed by Brian Burg.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ New strings for breakpoints disabled warning banner.
+
+ * UserInterface/Views/DebuggerSidebarPanel.css:
+ (.sidebar > .panel.navigation.debugger .warning-banner):
+ (.sidebar > .panel.navigation.debugger .warning-banner > a):
+ Generalize the class name to "warning-banner".
+
+ * UserInterface/Views/DebuggerSidebarPanel.js:
+ (WebInspector.DebuggerSidebarPanel):
+ (WebInspector.DebuggerSidebarPanel.prototype._breakpointsEnabledDidChange):
+ (WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingWillStart):
+ (WebInspector.DebuggerSidebarPanel.prototype._timelineCapturingStopped):
+ (WebInspector.DebuggerSidebarPanel.prototype._updateBreakpointsDisabledBanner):
+ Show / hide a breakpoints disabled warning banner as needed.
+ Only one banner shows at a time, so either the timing warning
+ or the generic breakpoints disabled banner will show.
+
</ins><span class="cx"> 2016-09-07 Johan K. Jensen <johan_jensen@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Show resource timing details in Network waterfall
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (205650 => 205651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-09-08 17:23:30 UTC (rev 205650)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-09-08 17:37:53 UTC (rev 205651)
</span><span class="lines">@@ -115,6 +115,7 @@
</span><span class="cx"> localizedStrings["Breakdown"] = "Breakdown";
</span><span class="cx"> localizedStrings["Breakdown of each memory category at the end of the selected time range"] = "Breakdown of each memory category at the end of the selected time range";
</span><span class="cx"> localizedStrings["Breakpoints"] = "Breakpoints";
</span><ins>+localizedStrings["Breakpoints are disabled."] = "Breakpoints are disabled.";
</ins><span class="cx"> localizedStrings["Bubbling"] = "Bubbling";
</span><span class="cx"> localizedStrings["Busy"] = "Busy";
</span><span class="cx"> localizedStrings["CSP Hash"] = "CSP Hash";
</span><span class="lines">@@ -303,6 +304,7 @@
</span><span class="cx"> localizedStrings["Enable Breakpoint"] = "Enable Breakpoint";
</span><span class="cx"> localizedStrings["Enable Breakpoints"] = "Enable Breakpoints";
</span><span class="cx"> localizedStrings["Enable all breakpoints (%s)"] = "Enable all breakpoints (%s)";
</span><ins>+localizedStrings["Enable breakpoints."] = "Enable breakpoints.";
</ins><span class="cx"> localizedStrings["Enable paint flashing"] = "Enable paint flashing";
</span><span class="cx"> localizedStrings["Encoded"] = "Encoded";
</span><span class="cx"> localizedStrings["Encoding"] = "Encoding";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPanelcss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css (205650 => 205651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css        2016-09-08 17:23:30 UTC (rev 205650)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css        2016-09-08 17:37:53 UTC (rev 205651)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> right: 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.sidebar > .panel.navigation.debugger .timeline-recording-warning {
</del><ins>+.sidebar > .panel.navigation.debugger .warning-banner {
</ins><span class="cx"> text-align: center;
</span><span class="cx"> font-size: 11px;
</span><span class="cx">
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> background-color: hsl(50, 100%, 94%);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-.sidebar > .panel.navigation.debugger .timeline-recording-warning > a {
</del><ins>+.sidebar > .panel.navigation.debugger .warning-banner > a {
</ins><span class="cx"> text-decoration: underline;
</span><span class="cx"> cursor: pointer;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDebuggerSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js (205650 => 205651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js        2016-09-08 17:23:30 UTC (rev 205650)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js        2016-09-08 17:37:53 UTC (rev 205651)
</span><span class="lines">@@ -50,12 +50,19 @@
</span><span class="cx"> WebInspector.timelineManager.addEventListener(WebInspector.TimelineManager.Event.CapturingStopped, this._timelineCapturingStopped, this);
</span><span class="cx">
</span><span class="cx"> this._timelineRecordingWarningElement = document.createElement("div");
</span><del>- this._timelineRecordingWarningElement.classList.add("timeline-recording-warning");
</del><ins>+ this._timelineRecordingWarningElement.classList.add("warning-banner");
</ins><span class="cx"> this._timelineRecordingWarningElement.append(WebInspector.UIString("Debugger is disabled during a Timeline recording."), " ");
</span><span class="cx"> let stopRecordingLink = this._timelineRecordingWarningElement.appendChild(document.createElement("a"));
</span><span class="cx"> stopRecordingLink.textContent = WebInspector.UIString("Stop recording.");
</span><span class="cx"> stopRecordingLink.addEventListener("click", () => { WebInspector.timelineManager.stopCapturing(); });
</span><span class="cx">
</span><ins>+ this._breakpointsDisabledWarningElement = document.createElement("div");
+ this._breakpointsDisabledWarningElement.classList.add("warning-banner");
+ this._breakpointsDisabledWarningElement.append(WebInspector.UIString("Breakpoints are disabled."), document.createElement("br"));
+ let enableBreakpointsLink = this._breakpointsDisabledWarningElement.appendChild(document.createElement("a"));
+ enableBreakpointsLink.textContent = WebInspector.UIString("Enable breakpoints.");
+ enableBreakpointsLink.addEventListener("click", () => { WebInspector.debuggerToggleBreakpoints(); });
+
</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">@@ -185,6 +192,8 @@
</span><span class="cx">
</span><span class="cx"> if (WebInspector.timelineManager.isCapturing() && WebInspector.debuggerManager.breakpointsDisabledTemporarily)
</span><span class="cx"> this._timelineCapturingWillStart(null);
</span><ins>+
+ this._updateBreakpointsDisabledBanner();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Public
</span><span class="lines">@@ -325,6 +334,8 @@
</span><span class="cx"> _breakpointsEnabledDidChange(event)
</span><span class="cx"> {
</span><span class="cx"> this._debuggerBreakpointsButtonItem.activated = WebInspector.debuggerManager.breakpointsEnabled;
</span><ins>+
+ this._updateBreakpointsDisabledBanner();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> _addBreakpoint(breakpoint)
</span><span class="lines">@@ -443,6 +454,7 @@
</span><span class="cx"> this._debuggerPauseResumeButtonItem.enabled = false;
</span><span class="cx">
</span><span class="cx"> this.contentView.element.insertBefore(this._timelineRecordingWarningElement, this.contentView.element.firstChild);
</span><ins>+ this._updateBreakpointsDisabledBanner();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> _timelineCapturingStopped(event)
</span><span class="lines">@@ -451,8 +463,20 @@
</span><span class="cx"> this._debuggerPauseResumeButtonItem.enabled = true;
</span><span class="cx">
</span><span class="cx"> this._timelineRecordingWarningElement.remove();
</span><ins>+ this._updateBreakpointsDisabledBanner();
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+ _updateBreakpointsDisabledBanner()
+ {
+ let breakpointsEnabled = WebInspector.debuggerManager.breakpointsEnabled;
+ let timelineWarningShowing = !!this._timelineRecordingWarningElement.parentElement;
+
+ if (!breakpointsEnabled && !timelineWarningShowing)
+ this.contentView.element.insertBefore(this._breakpointsDisabledWarningElement, this.contentView.element.firstChild);
+ else
+ this._breakpointsDisabledWarningElement.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>