<!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>[189189] 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/189189">189189</a></dd>
<dt>Author</dt> <dd>mattbaker@apple.com</dd>
<dt>Date</dt> <dd>2015-08-31 15:39:30 -0700 (Mon, 31 Aug 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: Move the Popover code out of the Breakpoint model object
https://bugs.webkit.org/show_bug.cgi?id=127328
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/BreakpointPopoverController.js: Added.
(WebInspector.BreakpointPopoverController):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation):
(WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
(WebInspector.BreakpointPopoverController.prototype.showEditBreakpointPopover):
(WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
(WebInspector.BreakpointPopoverController.prototype._popoverToggleEnabledCheckboxChanged):
(WebInspector.BreakpointPopoverController.prototype._popoverConditionInputChanged):
(WebInspector.BreakpointPopoverController.prototype._popoverToggleAutoContinueCheckboxChanged):
(WebInspector.BreakpointPopoverController.prototype._popoverConditionInputKeyDown):
(WebInspector.BreakpointPopoverController.prototype._popoverActionsCreateAddActionButton):
(WebInspector.BreakpointPopoverController.prototype._popoverActionsAddActionButtonClicked):
(WebInspector.BreakpointPopoverController.prototype._popoverActionsInsertBreakpointActionView):
(WebInspector.BreakpointPopoverController.prototype.breakpointActionViewAppendActionView):
(WebInspector.BreakpointPopoverController.prototype.breakpointActionViewRemoveActionView):
(WebInspector.BreakpointPopoverController.prototype.breakpointActionViewResized):
(WebInspector.BreakpointPopoverController.prototype.willDismissPopover):
(WebInspector.BreakpointPopoverController.prototype.didDismissPopover):
Added controller class to encapsulate view logic previously located in WebInspector.Breakpoint.
* UserInterface/Main.html:
Added and updated file paths.
* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint.prototype.appendContextMenuItems.editBreakpoint): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems.removeBreakpoint): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems.toggleBreakpoint): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems.toggleAutoContinue): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted.
(WebInspector.Breakpoint.prototype.appendContextMenuItems): Deleted.
(WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): Deleted.
(WebInspector.Breakpoint.prototype._popoverConditionInputChanged): Deleted.
(WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): Deleted.
(WebInspector.Breakpoint.prototype._popoverConditionInputKeyDown): Deleted.
(WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Deleted.
(WebInspector.Breakpoint.prototype._popoverActionsCreateAddActionButton): Deleted.
(WebInspector.Breakpoint.prototype._popoverActionsAddActionButtonClicked): Deleted.
(WebInspector.Breakpoint.prototype._popoverActionsInsertBreakpointActionView): Deleted.
(WebInspector.Breakpoint.prototype.breakpointActionViewAppendActionView): Deleted.
(WebInspector.Breakpoint.prototype.breakpointActionViewRemoveActionView): Deleted.
(WebInspector.Breakpoint.prototype.breakpointActionViewResized): Deleted.
(WebInspector.Breakpoint.prototype.willDismissPopover): Deleted.
(WebInspector.Breakpoint.prototype.didDismissPopover): Deleted.
(WebInspector.Breakpoint.prototype._showEditBreakpointPopover): Deleted.
Removed view logic.
* UserInterface/Views/BreakpointPopoverController.css: Renamed from Source/WebInspectorUI/UserInterface/Views/Breakpoint.css.
(.popover .edit-breakpoint-popover-content):
(.popover .edit-breakpoint-popover-content.wide):
(.popover .edit-breakpoint-popover-content > label.toggle):
(.popover .edit-breakpoint-popover-content > table):
(.popover .edit-breakpoint-popover-content > table > tr > th):
(.popover .edit-breakpoint-popover-content > table > tr > td):
(#edit-breakpoint-popover-condition):
(#edit-breakpoint-popoover-auto-continue):
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
Creates a BreakpointPopoverController instance. The lifetime of the 'Edit Breakpoint' view is internal to the
controller, and can't be initiated outside of a context menu item click.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceMainhtml">trunk/Source/WebInspectorUI/UserInterface/Main.html</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsBreakpointjs">trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsSourceCodeTextEditorjs">trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersBreakpointPopoverControllerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsBreakpointPopoverControllercss">trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopoverController.css</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsBreakpointcss">trunk/Source/WebInspectorUI/UserInterface/Views/Breakpoint.css</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (189188 => 189189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-08-31 22:32:31 UTC (rev 189188)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-08-31 22:39:30 UTC (rev 189189)
</span><span class="lines">@@ -1,5 +1,77 @@
</span><span class="cx"> 2015-08-31 Matt Baker <mattbaker@apple.com>
</span><span class="cx">
</span><ins>+ Web Inspector: Move the Popover code out of the Breakpoint model object
+ https://bugs.webkit.org/show_bug.cgi?id=127328
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Controllers/BreakpointPopoverController.js: Added.
+ (WebInspector.BreakpointPopoverController):
+ (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint):
+ (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint):
+ (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint):
+ (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue):
+ (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation):
+ (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
+ (WebInspector.BreakpointPopoverController.prototype.showEditBreakpointPopover):
+ (WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
+ (WebInspector.BreakpointPopoverController.prototype._popoverToggleEnabledCheckboxChanged):
+ (WebInspector.BreakpointPopoverController.prototype._popoverConditionInputChanged):
+ (WebInspector.BreakpointPopoverController.prototype._popoverToggleAutoContinueCheckboxChanged):
+ (WebInspector.BreakpointPopoverController.prototype._popoverConditionInputKeyDown):
+ (WebInspector.BreakpointPopoverController.prototype._popoverActionsCreateAddActionButton):
+ (WebInspector.BreakpointPopoverController.prototype._popoverActionsAddActionButtonClicked):
+ (WebInspector.BreakpointPopoverController.prototype._popoverActionsInsertBreakpointActionView):
+ (WebInspector.BreakpointPopoverController.prototype.breakpointActionViewAppendActionView):
+ (WebInspector.BreakpointPopoverController.prototype.breakpointActionViewRemoveActionView):
+ (WebInspector.BreakpointPopoverController.prototype.breakpointActionViewResized):
+ (WebInspector.BreakpointPopoverController.prototype.willDismissPopover):
+ (WebInspector.BreakpointPopoverController.prototype.didDismissPopover):
+ Added controller class to encapsulate view logic previously located in WebInspector.Breakpoint.
+
+ * UserInterface/Main.html:
+ Added and updated file paths.
+
+ * UserInterface/Models/Breakpoint.js:
+ (WebInspector.Breakpoint.prototype.appendContextMenuItems.editBreakpoint): Deleted.
+ (WebInspector.Breakpoint.prototype.appendContextMenuItems.removeBreakpoint): Deleted.
+ (WebInspector.Breakpoint.prototype.appendContextMenuItems.toggleBreakpoint): Deleted.
+ (WebInspector.Breakpoint.prototype.appendContextMenuItems.toggleAutoContinue): Deleted.
+ (WebInspector.Breakpoint.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted.
+ (WebInspector.Breakpoint.prototype.appendContextMenuItems): Deleted.
+ (WebInspector.Breakpoint.prototype._popoverToggleEnabledCheckboxChanged): Deleted.
+ (WebInspector.Breakpoint.prototype._popoverConditionInputChanged): Deleted.
+ (WebInspector.Breakpoint.prototype._popoverToggleAutoContinueCheckboxChanged): Deleted.
+ (WebInspector.Breakpoint.prototype._popoverConditionInputKeyDown): Deleted.
+ (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement): Deleted.
+ (WebInspector.Breakpoint.prototype._popoverActionsCreateAddActionButton): Deleted.
+ (WebInspector.Breakpoint.prototype._popoverActionsAddActionButtonClicked): Deleted.
+ (WebInspector.Breakpoint.prototype._popoverActionsInsertBreakpointActionView): Deleted.
+ (WebInspector.Breakpoint.prototype.breakpointActionViewAppendActionView): Deleted.
+ (WebInspector.Breakpoint.prototype.breakpointActionViewRemoveActionView): Deleted.
+ (WebInspector.Breakpoint.prototype.breakpointActionViewResized): Deleted.
+ (WebInspector.Breakpoint.prototype.willDismissPopover): Deleted.
+ (WebInspector.Breakpoint.prototype.didDismissPopover): Deleted.
+ (WebInspector.Breakpoint.prototype._showEditBreakpointPopover): Deleted.
+ Removed view logic.
+
+ * UserInterface/Views/BreakpointPopoverController.css: Renamed from Source/WebInspectorUI/UserInterface/Views/Breakpoint.css.
+ (.popover .edit-breakpoint-popover-content):
+ (.popover .edit-breakpoint-popover-content.wide):
+ (.popover .edit-breakpoint-popover-content > label.toggle):
+ (.popover .edit-breakpoint-popover-content > table):
+ (.popover .edit-breakpoint-popover-content > table > tr > th):
+ (.popover .edit-breakpoint-popover-content > table > tr > td):
+ (#edit-breakpoint-popover-condition):
+ (#edit-breakpoint-popoover-auto-continue):
+
+ * UserInterface/Views/SourceCodeTextEditor.js:
+ (WebInspector.SourceCodeTextEditor):
+ Creates a BreakpointPopoverController instance. The lifetime of the 'Edit Breakpoint' view is internal to the
+ controller, and can't be initiated outside of a context menu item click.
+
+2015-08-31 Matt Baker <mattbaker@apple.com>
+
</ins><span class="cx"> Web Inspector: Rendering Frame tasks making up < 1% of the selection don't appear in the pie chart
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=148549
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersBreakpointPopoverControllerjs"></a>
<div class="addfile"><h4>Added: trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js (0 => 189189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/BreakpointPopoverController.js        2015-08-31 22:39:30 UTC (rev 189189)
</span><span class="lines">@@ -0,0 +1,305 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+WebInspector.BreakpointPopoverController = class BreakpointPopoverController extends WebInspector.Object
+{
+ constructor()
+ {
+ super();
+
+ this._breakpoint = null;
+ this._popover = null;
+ this._popoverContentElement = null;
+ this._keyboardShortcutEsc = new WebInspector.KeyboardShortcut(null, WebInspector.KeyboardShortcut.Key.Escape);
+ this._keyboardShortcutEnter = new WebInspector.KeyboardShortcut(null, WebInspector.KeyboardShortcut.Key.Enter);
+ }
+
+ // Public
+
+ appendContextMenuItems(contextMenu, breakpoint, breakpointDisplayElement)
+ {
+ console.assert(document.body.contains(breakpointDisplayElement), "Breakpoint popover display element must be in the DOM.");
+
+ function editBreakpoint()
+ {
+ console.assert(!this._popover, "Breakpoint popover already exists.");
+ if (this._popover)
+ return;
+
+ this._createPopoverContent(breakpoint);
+ this._popover = new WebInspector.Popover(this);
+ this._popover.content = this._popoverContentElement;
+
+ let bounds = WebInspector.Rect.rectFromClientRect(breakpointDisplayElement.getBoundingClientRect());
+ bounds.origin.x -= 1; // Move the anchor left one pixel so it looks more centered.
+ this._popover.present(bounds.pad(2), [WebInspector.RectEdge.MAX_Y]);
+
+ document.getElementById(WebInspector.BreakpointPopoverController.PopoverConditionInputId).select();
+ }
+
+ function removeBreakpoint()
+ {
+ WebInspector.debuggerManager.removeBreakpoint(breakpoint);
+ }
+
+ function toggleBreakpoint()
+ {
+ breakpoint.disabled = !breakpoint.disabled;
+ }
+
+ function toggleAutoContinue()
+ {
+ breakpoint.autoContinue = !breakpoint.autoContinue;
+ }
+
+ function revealOriginalSourceCodeLocation()
+ {
+ WebInspector.showOriginalOrFormattedSourceCodeLocation(breakpoint.sourceCodeLocation);
+ }
+
+ if (WebInspector.debuggerManager.isBreakpointEditable(breakpoint))
+ contextMenu.appendItem(WebInspector.UIString("Edit Breakpoint…"), editBreakpoint.bind(this));
+
+ if (breakpoint.autoContinue && !breakpoint.disabled) {
+ contextMenu.appendItem(WebInspector.UIString("Disable Breakpoint"), toggleBreakpoint.bind(this));
+ contextMenu.appendItem(WebInspector.UIString("Cancel Automatic Continue"), toggleAutoContinue.bind(this));
+ } else if (!breakpoint.disabled)
+ contextMenu.appendItem(WebInspector.UIString("Disable Breakpoint"), toggleBreakpoint.bind(this));
+ else
+ contextMenu.appendItem(WebInspector.UIString("Enable Breakpoint"), toggleBreakpoint.bind(this));
+
+ if (!breakpoint.autoContinue && !breakpoint.disabled && breakpoint.actions.length)
+ contextMenu.appendItem(WebInspector.UIString("Set to Automatically Continue"), toggleAutoContinue.bind(this));
+
+ if (WebInspector.debuggerManager.isBreakpointRemovable(breakpoint)) {
+ contextMenu.appendSeparator();
+ contextMenu.appendItem(WebInspector.UIString("Delete Breakpoint"), removeBreakpoint.bind(this));
+ }
+
+ if (breakpoint._sourceCodeLocation.hasMappedLocation()) {
+ contextMenu.appendSeparator();
+ contextMenu.appendItem(WebInspector.UIString("Reveal in Original Resource"), revealOriginalSourceCodeLocation.bind(this));
+ }
+ }
+
+ // Private
+
+ _createPopoverContent(breakpoint)
+ {
+ console.assert(!this._popoverContentElement, "Popover content element already exists.");
+ if (this._popoverContentElement)
+ return;
+
+ this._breakpoint = breakpoint;
+ this._popoverContentElement = document.createElement("div");
+ this._popoverContentElement.className = "edit-breakpoint-popover-content";
+
+ let checkboxElement = document.createElement("input");
+ checkboxElement.type = "checkbox";
+ checkboxElement.checked = !this._breakpoint.disabled;
+ checkboxElement.addEventListener("change", this._popoverToggleEnabledCheckboxChanged.bind(this));
+
+ let checkboxLabel = document.createElement("label");
+ checkboxLabel.className = "toggle";
+ checkboxLabel.appendChild(checkboxElement);
+ checkboxLabel.append(this._breakpoint.sourceCodeLocation.displayLocationString());
+
+ let table = document.createElement("table");
+
+ let conditionRow = table.appendChild(document.createElement("tr"));
+ let conditionHeader = conditionRow.appendChild(document.createElement("th"));
+ let conditionData = conditionRow.appendChild(document.createElement("td"));
+ let conditionLabel = conditionHeader.appendChild(document.createElement("label"));
+ let conditionInput = conditionData.appendChild(document.createElement("input"));
+ conditionInput.id = WebInspector.BreakpointPopoverController.PopoverConditionInputId;
+ conditionInput.value = this._breakpoint.condition || "";
+ conditionInput.spellcheck = false;
+ conditionInput.addEventListener("change", this._popoverConditionInputChanged.bind(this));
+ conditionInput.addEventListener("keydown", this._popoverConditionInputKeyDown.bind(this));
+ conditionInput.placeholder = WebInspector.UIString("Conditional expression");
+ conditionLabel.setAttribute("for", conditionInput.id);
+ conditionLabel.textContent = WebInspector.UIString("Condition");
+
+ // COMPATIBILITY (iOS 7): Debugger.setBreakpoint did not support options.
+ if (DebuggerAgent.setBreakpoint.supports("options")) {
+ let actionRow = table.appendChild(document.createElement("tr"));
+ let actionHeader = actionRow.appendChild(document.createElement("th"));
+ let actionData = this._actionsContainer = actionRow.appendChild(document.createElement("td"));
+ let actionLabel = actionHeader.appendChild(document.createElement("label"));
+ actionLabel.textContent = WebInspector.UIString("Action");
+
+ if (!this._breakpoint.actions.length)
+ this._popoverActionsCreateAddActionButton();
+ else {
+ this._popoverContentElement.classList.add(WebInspector.BreakpointPopoverController.WidePopoverClassName);
+ for (let i = 0; i < this._breakpoint.actions.length; ++i) {
+ let breakpointActionView = new WebInspector.BreakpointActionView(this._breakpoint.actions[i], this, true);
+ this._popoverActionsInsertBreakpointActionView(breakpointActionView, i);
+ }
+ }
+
+ let optionsRow = this._popoverOptionsRowElement = table.appendChild(document.createElement("tr"));
+ if (!this._breakpoint.actions.length)
+ optionsRow.classList.add(WebInspector.BreakpointPopoverController.HiddenStyleClassName);
+ let optionsHeader = optionsRow.appendChild(document.createElement("th"));
+ let optionsData = optionsRow.appendChild(document.createElement("td"));
+ let optionsLabel = optionsHeader.appendChild(document.createElement("label"));
+ let optionsCheckbox = this._popoverOptionsCheckboxElement = optionsData.appendChild(document.createElement("input"));
+ let optionsCheckboxLabel = optionsData.appendChild(document.createElement("label"));
+ optionsCheckbox.id = "edit-breakpoint-popoover-auto-continue";
+ optionsCheckbox.type = "checkbox";
+ optionsCheckbox.checked = this._breakpoint.autoContinue;
+ optionsCheckbox.addEventListener("change", this._popoverToggleAutoContinueCheckboxChanged.bind(this));
+ optionsLabel.textContent = WebInspector.UIString("Options");
+ optionsCheckboxLabel.setAttribute("for", optionsCheckbox.id);
+ optionsCheckboxLabel.textContent = WebInspector.UIString("Automatically continue after evaluating");
+ }
+
+ this._popoverContentElement.appendChild(checkboxLabel);
+ this._popoverContentElement.appendChild(table);
+ }
+
+ _popoverToggleEnabledCheckboxChanged(event)
+ {
+ this._breakpoint.disabled = !event.target.checked;
+ }
+
+ _popoverConditionInputChanged(event)
+ {
+ this._breakpoint.condition = event.target.value;
+ }
+
+ _popoverToggleAutoContinueCheckboxChanged(event)
+ {
+ this._breakpoint.autoContinue = event.target.checked;
+ }
+
+ _popoverConditionInputKeyDown(event)
+ {
+ if (this._keyboardShortcutEsc.matchesEvent(event) || this._keyboardShortcutEnter.matchesEvent(event)) {
+ this._popover.dismiss();
+ event.stopPropagation();
+ event.preventDefault();
+ }
+ }
+
+ _popoverActionsCreateAddActionButton()
+ {
+ this._popoverContentElement.classList.remove(WebInspector.BreakpointPopoverController.WidePopoverClassName);
+ this._actionsContainer.removeChildren();
+
+ let addActionButton = this._actionsContainer.appendChild(document.createElement("button"));
+ addActionButton.textContent = WebInspector.UIString("Add Action");
+ addActionButton.addEventListener("click", this._popoverActionsAddActionButtonClicked.bind(this));
+ }
+
+ _popoverActionsAddActionButtonClicked(event)
+ {
+ this._popoverContentElement.classList.add(WebInspector.BreakpointPopoverController.WidePopoverClassName);
+ this._actionsContainer.removeChildren();
+
+ let newAction = this._breakpoint.createAction(WebInspector.Breakpoint.DefaultBreakpointActionType);
+ let newBreakpointActionView = new WebInspector.BreakpointActionView(newAction, this);
+ this._popoverActionsInsertBreakpointActionView(newBreakpointActionView, -1);
+ this._popoverOptionsRowElement.classList.remove(WebInspector.BreakpointPopoverController.HiddenStyleClassName);
+ this._popover.update();
+ }
+
+ _popoverActionsInsertBreakpointActionView(breakpointActionView, index)
+ {
+ if (index === -1)
+ this._actionsContainer.appendChild(breakpointActionView.element);
+ else {
+ let nextElement = this._actionsContainer.children[index + 1] || null;
+ this._actionsContainer.insertBefore(breakpointActionView.element, nextElement);
+ }
+ }
+
+ breakpointActionViewAppendActionView(breakpointActionView, newAction)
+ {
+ let newBreakpointActionView = new WebInspector.BreakpointActionView(newAction, this);
+
+ let index = 0;
+ let children = this._actionsContainer.children;
+ for (let i = 0; children.length; ++i) {
+ if (children[i] === breakpointActionView.element) {
+ index = i;
+ break;
+ }
+ }
+
+ this._popoverActionsInsertBreakpointActionView(newBreakpointActionView, index);
+ this._popoverOptionsRowElement.classList.remove(WebInspector.BreakpointPopoverController.HiddenStyleClassName);
+
+ this._popover.update();
+ }
+
+ breakpointActionViewRemoveActionView(breakpointActionView)
+ {
+ breakpointActionView.element.remove();
+
+ if (!this._actionsContainer.children.length) {
+ this._popoverActionsCreateAddActionButton();
+ this._popoverOptionsRowElement.classList.add(WebInspector.BreakpointPopoverController.HiddenStyleClassName);
+ this._popoverOptionsCheckboxElement.checked = false;
+ }
+
+ this._popover.update();
+ }
+
+ breakpointActionViewResized(breakpointActionView)
+ {
+ this._popover.update();
+ }
+
+ willDismissPopover(popover)
+ {
+ console.assert(this._popover === popover);
+ this._popoverContentElement = null;
+ this._popoverOptionsRowElement = null;
+ this._popoverOptionsCheckboxElement = null;
+ this._actionsContainer = null;
+ this._popover = null;
+ }
+
+ didDismissPopover(popover)
+ {
+ // Remove Evaluate and Probe actions that have no data.
+ let emptyActions = this._breakpoint.actions.filter(function(action) {
+ if (action.type !== WebInspector.BreakpointAction.Type.Evaluate && action.type !== WebInspector.BreakpointAction.Type.Probe)
+ return false;
+ return !(action.data && action.data.trim());
+ });
+
+ for (let action of emptyActions)
+ this._breakpoint.removeAction(action);
+
+ this._breakpoint = null;
+ }
+};
+
+WebInspector.BreakpointPopoverController.WidePopoverClassName = "wide";
+WebInspector.BreakpointPopoverController.PopoverConditionInputId = "edit-breakpoint-popover-condition";
+WebInspector.BreakpointPopoverController.HiddenStyleClassName = "hidden";
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceMainhtml"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Main.html (189188 => 189189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-08-31 22:32:31 UTC (rev 189188)
+++ trunk/Source/WebInspectorUI/UserInterface/Main.html        2015-08-31 22:39:30 UTC (rev 189189)
</span><span class="lines">@@ -34,8 +34,8 @@
</span><span class="cx"> <link rel="stylesheet" href="Views/ApplicationCacheIcons.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/BezierEditor.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/BoxModelDetailsSectionRow.css">
</span><del>- <link rel="stylesheet" href="Views/Breakpoint.css">
</del><span class="cx"> <link rel="stylesheet" href="Views/BreakpointActionView.css">
</span><ins>+ <link rel="stylesheet" href="Views/BreakpointPopoverController.css">
</ins><span class="cx"> <link rel="stylesheet" href="Views/BreakpointTreeElement.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/ButtonNavigationItem.css">
</span><span class="cx"> <link rel="stylesheet" href="Views/ButtonToolbarItem.css">
</span><span class="lines">@@ -583,6 +583,7 @@
</span><span class="cx"> <script src="Controllers/ApplicationCacheManager.js"></script>
</span><span class="cx"> <script src="Controllers/BasicBlockAnnotator.js"></script>
</span><span class="cx"> <script src="Controllers/BranchManager.js"></script>
</span><ins>+ <script src="Controllers/BreakpointPopoverController.js"></script>
</ins><span class="cx"> <script src="Controllers/CSSStyleManager.js"></script>
</span><span class="cx"> <script src="Controllers/CodeMirrorColorEditingController.js"></script>
</span><span class="cx"> <script src="Controllers/CodeMirrorCompletionController.js"></script>
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsBreakpointjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js (189188 => 189189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js        2015-08-31 22:32:31 UTC (rev 189188)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js        2015-08-31 22:39:30 UTC (rev 189189)
</span><span class="lines">@@ -213,62 +213,6 @@
</span><span class="cx"> this.disabled = true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- appendContextMenuItems(contextMenu, breakpointDisplayElement)
- {
- console.assert(document.body.contains(breakpointDisplayElement), "breakpoint popover display element must be in the DOM");
-
- var boundingClientRect = breakpointDisplayElement.getBoundingClientRect();
-
- function editBreakpoint()
- {
- this._showEditBreakpointPopover(boundingClientRect);
- }
-
- function removeBreakpoint()
- {
- WebInspector.debuggerManager.removeBreakpoint(this);
- }
-
- function toggleBreakpoint()
- {
- this.disabled = !this.disabled;
- }
-
- function toggleAutoContinue()
- {
- this.autoContinue = !this.autoContinue;
- }
-
- function revealOriginalSourceCodeLocation()
- {
- WebInspector.showOriginalOrFormattedSourceCodeLocation(this._sourceCodeLocation);
- }
-
- if (WebInspector.debuggerManager.isBreakpointEditable(this))
- contextMenu.appendItem(WebInspector.UIString("Edit Breakpoint…"), editBreakpoint.bind(this));
-
- if (this.autoContinue && !this.disabled) {
- contextMenu.appendItem(WebInspector.UIString("Disable Breakpoint"), toggleBreakpoint.bind(this));
- contextMenu.appendItem(WebInspector.UIString("Cancel Automatic Continue"), toggleAutoContinue.bind(this));
- } else if (!this.disabled)
- contextMenu.appendItem(WebInspector.UIString("Disable Breakpoint"), toggleBreakpoint.bind(this));
- else
- contextMenu.appendItem(WebInspector.UIString("Enable Breakpoint"), toggleBreakpoint.bind(this));
-
- if (!this.autoContinue && !this.disabled && this.actions.length)
- contextMenu.appendItem(WebInspector.UIString("Set to Automatically Continue"), toggleAutoContinue.bind(this));
-
- if (WebInspector.debuggerManager.isBreakpointRemovable(this)) {
- contextMenu.appendSeparator();
- contextMenu.appendItem(WebInspector.UIString("Delete Breakpoint"), removeBreakpoint.bind(this));
- }
-
- if (this._sourceCodeLocation.hasMappedLocation()) {
- contextMenu.appendSeparator();
- contextMenu.appendItem(WebInspector.UIString("Reveal in Original Resource"), revealOriginalSourceCodeLocation.bind(this));
- }
- }
-
</del><span class="cx"> createAction(type, precedingAction, data)
</span><span class="cx"> {
</span><span class="cx"> var newAction = new WebInspector.BreakpointAction(this, type, data || null);
</span><span class="lines">@@ -359,211 +303,6 @@
</span><span class="cx"> return actions;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- _popoverToggleEnabledCheckboxChanged(event)
- {
- this.disabled = !event.target.checked;
- }
-
- _popoverConditionInputChanged(event)
- {
- this.condition = event.target.value;
- }
-
- _popoverToggleAutoContinueCheckboxChanged(event)
- {
- this.autoContinue = event.target.checked;
- }
-
- _popoverConditionInputKeyDown(event)
- {
- if (this._keyboardShortcutEsc.matchesEvent(event) || this._keyboardShortcutEnter.matchesEvent(event)) {
- this._popover.dismiss();
- event.stopPropagation();
- event.preventDefault();
- }
- }
-
- _editBreakpointPopoverContentElement()
- {
- var content = this._popoverContentElement = document.createElement("div");
- content.className = WebInspector.Breakpoint.PopoverClassName;
-
- var checkboxElement = document.createElement("input");
- checkboxElement.type = "checkbox";
- checkboxElement.checked = !this._disabled;
- checkboxElement.addEventListener("change", this._popoverToggleEnabledCheckboxChanged.bind(this));
-
- var checkboxLabel = document.createElement("label");
- checkboxLabel.className = "toggle";
- checkboxLabel.appendChild(checkboxElement);
- checkboxLabel.append(this._sourceCodeLocation.displayLocationString());
-
- var table = document.createElement("table");
-
- var conditionRow = table.appendChild(document.createElement("tr"));
- var conditionHeader = conditionRow.appendChild(document.createElement("th"));
- var conditionData = conditionRow.appendChild(document.createElement("td"));
- var conditionLabel = conditionHeader.appendChild(document.createElement("label"));
- var conditionInput = conditionData.appendChild(document.createElement("input"));
- conditionInput.id = WebInspector.Breakpoint.PopoverConditionInputId;
- conditionInput.value = this._condition || "";
- conditionInput.spellcheck = false;
- conditionInput.addEventListener("change", this._popoverConditionInputChanged.bind(this));
- conditionInput.addEventListener("keydown", this._popoverConditionInputKeyDown.bind(this));
- conditionInput.placeholder = WebInspector.UIString("Conditional expression");
- conditionLabel.setAttribute("for", conditionInput.id);
- conditionLabel.textContent = WebInspector.UIString("Condition");
-
- // COMPATIBILITY (iOS 7): Debugger.setBreakpoint did not support options.
- if (DebuggerAgent.setBreakpoint.supports("options")) {
- var actionRow = table.appendChild(document.createElement("tr"));
- var actionHeader = actionRow.appendChild(document.createElement("th"));
- var actionData = this._actionsContainer = actionRow.appendChild(document.createElement("td"));
- var actionLabel = actionHeader.appendChild(document.createElement("label"));
- actionLabel.textContent = WebInspector.UIString("Action");
-
- if (!this._actions.length)
- this._popoverActionsCreateAddActionButton();
- else {
- this._popoverContentElement.classList.add(WebInspector.Breakpoint.WidePopoverClassName);
- for (var i = 0; i < this._actions.length; ++i) {
- var breakpointActionView = new WebInspector.BreakpointActionView(this._actions[i], this, true);
- this._popoverActionsInsertBreakpointActionView(breakpointActionView, i);
- }
- }
-
- var optionsRow = this._popoverOptionsRowElement = table.appendChild(document.createElement("tr"));
- if (!this._actions.length)
- optionsRow.classList.add(WebInspector.Breakpoint.HiddenStyleClassName);
- var optionsHeader = optionsRow.appendChild(document.createElement("th"));
- var optionsData = optionsRow.appendChild(document.createElement("td"));
- var optionsLabel = optionsHeader.appendChild(document.createElement("label"));
- var optionsCheckbox = this._popoverOptionsCheckboxElement = optionsData.appendChild(document.createElement("input"));
- var optionsCheckboxLabel = optionsData.appendChild(document.createElement("label"));
- optionsCheckbox.id = WebInspector.Breakpoint.PopoverOptionsAutoContinueInputId;
- optionsCheckbox.type = "checkbox";
- optionsCheckbox.checked = this._autoContinue;
- optionsCheckbox.addEventListener("change", this._popoverToggleAutoContinueCheckboxChanged.bind(this));
- optionsLabel.textContent = WebInspector.UIString("Options");
- optionsCheckboxLabel.setAttribute("for", optionsCheckbox.id);
- optionsCheckboxLabel.textContent = WebInspector.UIString("Automatically continue after evaluating");
- }
-
- content.appendChild(checkboxLabel);
- content.appendChild(table);
-
- return content;
- }
-
- _popoverActionsCreateAddActionButton()
- {
- this._popoverContentElement.classList.remove(WebInspector.Breakpoint.WidePopoverClassName);
- this._actionsContainer.removeChildren();
-
- var addActionButton = this._actionsContainer.appendChild(document.createElement("button"));
- addActionButton.textContent = WebInspector.UIString("Add Action");
- addActionButton.addEventListener("click", this._popoverActionsAddActionButtonClicked.bind(this));
- }
-
- _popoverActionsAddActionButtonClicked(event)
- {
- this._popoverContentElement.classList.add(WebInspector.Breakpoint.WidePopoverClassName);
- this._actionsContainer.removeChildren();
-
- var newAction = this.createAction(WebInspector.Breakpoint.DefaultBreakpointActionType);
- var newBreakpointActionView = new WebInspector.BreakpointActionView(newAction, this);
- this._popoverActionsInsertBreakpointActionView(newBreakpointActionView, -1);
- this._popoverOptionsRowElement.classList.remove(WebInspector.Breakpoint.HiddenStyleClassName);
- this._popover.update();
- }
-
- _popoverActionsInsertBreakpointActionView(breakpointActionView, index)
- {
- if (index === -1)
- this._actionsContainer.appendChild(breakpointActionView.element);
- else {
- var nextElement = this._actionsContainer.children[index + 1] || null;
- this._actionsContainer.insertBefore(breakpointActionView.element, nextElement);
- }
- }
-
- breakpointActionViewAppendActionView(breakpointActionView, newAction)
- {
- var newBreakpointActionView = new WebInspector.BreakpointActionView(newAction, this);
-
- var index = 0;
- var children = this._actionsContainer.children;
- for (var i = 0; children.length; ++i) {
- if (children[i] === breakpointActionView.element) {
- index = i;
- break;
- }
- }
-
- this._popoverActionsInsertBreakpointActionView(newBreakpointActionView, index);
- this._popoverOptionsRowElement.classList.remove(WebInspector.Breakpoint.HiddenStyleClassName);
-
- this._popover.update();
- }
-
- breakpointActionViewRemoveActionView(breakpointActionView)
- {
- breakpointActionView.element.remove();
-
- if (!this._actionsContainer.children.length) {
- this._popoverActionsCreateAddActionButton();
- this._popoverOptionsRowElement.classList.add(WebInspector.Breakpoint.HiddenStyleClassName);
- this._popoverOptionsCheckboxElement.checked = false;
- }
-
- this._popover.update();
- }
-
- breakpointActionViewResized(breakpointActionView)
- {
- this._popover.update();
- }
-
- willDismissPopover(popover)
- {
- console.assert(this._popover === popover);
- delete this._popoverContentElement;
- delete this._popoverOptionsRowElement;
- delete this._popoverOptionsCheckboxElement;
- delete this._actionsContainer;
- delete this._popover;
- }
-
- didDismissPopover(popover)
- {
- // Remove Evaluate and Probe actions that have no data.
- var emptyActions = this._actions.filter(function(action) {
- if (action.type !== WebInspector.BreakpointAction.Type.Evaluate && action.type !== WebInspector.BreakpointAction.Type.Probe)
- return false;
- return !(action.data && action.data.trim());
- });
-
- for (var action of emptyActions)
- this.removeAction(action);
- }
-
- _showEditBreakpointPopover(boundingClientRect)
- {
- var bounds = WebInspector.Rect.rectFromClientRect(boundingClientRect);
- bounds.origin.x -= 1; // Move the anchor left one pixel so it looks more centered.
-
- this._popover = this._popover || new WebInspector.Popover(this);
- this._popover.content = this._editBreakpointPopoverContentElement();
- this._popover.present(bounds.pad(2), [WebInspector.RectEdge.MAX_Y]);
-
- if (!this._keyboardShortcutEsc) {
- this._keyboardShortcutEsc = new WebInspector.KeyboardShortcut(null, WebInspector.KeyboardShortcut.Key.Escape);
- this._keyboardShortcutEnter = new WebInspector.KeyboardShortcut(null, WebInspector.KeyboardShortcut.Key.Enter);
- }
-
- document.getElementById(WebInspector.Breakpoint.PopoverConditionInputId).select();
- }
-
</del><span class="cx"> _sourceCodeLocationLocationChanged(event)
</span><span class="cx"> {
</span><span class="cx"> this.dispatchEventToListeners(WebInspector.Breakpoint.Event.LocationDidChange, event.data);
</span><span class="lines">@@ -575,12 +314,6 @@
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><del>-WebInspector.Breakpoint.PopoverClassName = "edit-breakpoint-popover-content";
-WebInspector.Breakpoint.WidePopoverClassName = "wide";
-WebInspector.Breakpoint.PopoverConditionInputId = "edit-breakpoint-popover-condition";
-WebInspector.Breakpoint.PopoverOptionsAutoContinueInputId = "edit-breakpoint-popoover-auto-continue";
-WebInspector.Breakpoint.HiddenStyleClassName = "hidden";
-
</del><span class="cx"> WebInspector.Breakpoint.DefaultBreakpointActionType = WebInspector.BreakpointAction.Type.Log;
</span><span class="cx">
</span><span class="cx"> WebInspector.Breakpoint.TypeIdentifier = "breakpoint";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsBreakpointcss"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebInspectorUI/UserInterface/Views/Breakpoint.css (189188 => 189189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/Breakpoint.css        2015-08-31 22:32:31 UTC (rev 189188)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Breakpoint.css        2015-08-31 22:39:30 UTC (rev 189189)
</span><span class="lines">@@ -1,66 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-.popover .edit-breakpoint-popover-content {
- width: 420px;
- padding: 5px 15px;
-}
-
-.popover .edit-breakpoint-popover-content.wide {
- width: 460px;
-}
-
-.popover .edit-breakpoint-popover-content > label.toggle {
- color: black;
- font-weight: bold;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
-.popover .edit-breakpoint-popover-content > table {
- width: 100%;
-}
-
-.popover .edit-breakpoint-popover-content > table > tr > th {
- color: hsl(0, 0%, 34%);
- font-weight: bold;
- text-align: right;
- width: 1px; /* Shrink to fit. */
- vertical-align: top;
- line-height: 23px;
-}
-
-.popover .edit-breakpoint-popover-content > table > tr > td {
- padding-left: 5px;
-}
-
-#edit-breakpoint-popover-condition {
- width: 100%;
-}
-
-#edit-breakpoint-popoover-auto-continue {
- margin-left: 0;
- margin-right: 4px;
-}
</del></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsBreakpointPopoverControllercssfromrev189188trunkSourceWebInspectorUIUserInterfaceViewsBreakpointcss"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopoverController.css (from rev 189188, trunk/Source/WebInspectorUI/UserInterface/Views/Breakpoint.css) (0 => 189189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopoverController.css         (rev 0)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointPopoverController.css        2015-08-31 22:39:30 UTC (rev 189189)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+/*
+ * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+.popover .edit-breakpoint-popover-content {
+ width: 420px;
+ padding: 5px 15px;
+}
+
+.popover .edit-breakpoint-popover-content.wide {
+ width: 460px;
+}
+
+.popover .edit-breakpoint-popover-content > label.toggle {
+ color: black;
+ font-weight: bold;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.popover .edit-breakpoint-popover-content > table {
+ width: 100%;
+}
+
+.popover .edit-breakpoint-popover-content > table > tr > th {
+ color: hsl(0, 0%, 34%);
+ font-weight: bold;
+ text-align: right;
+ width: 1px; /* Shrink to fit. */
+ vertical-align: top;
+ line-height: 23px;
+}
+
+.popover .edit-breakpoint-popover-content > table > tr > td {
+ padding-left: 5px;
+}
+
+#edit-breakpoint-popover-condition {
+ width: 100%;
+}
+
+#edit-breakpoint-popoover-auto-continue {
+ margin-left: 0;
+ margin-right: 4px;
+}
</ins></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsSourceCodeTextEditorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js (189188 => 189189)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js        2015-08-31 22:32:31 UTC (rev 189188)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js        2015-08-31 22:39:30 UTC (rev 189189)
</span><span class="lines">@@ -47,6 +47,8 @@
</span><span class="cx">
</span><span class="cx"> this._isProbablyMinified = false;
</span><span class="cx">
</span><ins>+ this._breakpointPopoverController = new WebInspector.BreakpointPopoverController;
+
</ins><span class="cx"> // FIXME: Currently this just jumps between resources and related source map resources. It doesn't "jump to symbol" yet.
</span><span class="cx"> this._updateTokenTrackingControllerState();
</span><span class="cx">
</span><span class="lines">@@ -1023,10 +1025,8 @@
</span><span class="cx">
</span><span class="cx"> // Single breakpoint.
</span><span class="cx"> if (breakpoints.length === 1) {
</span><del>- var breakpoint = breakpoints[0];
</del><ins>+ this._breakpointPopoverController.appendContextMenuItems(contextMenu, breakpoints[0], event.target);
</ins><span class="cx">
</span><del>- breakpoint.appendContextMenuItems(contextMenu, event.target);
-
</del><span class="cx"> if (!WebInspector.isShowingDebuggerTab()) {
</span><span class="cx"> contextMenu.appendSeparator();
</span><span class="cx"> contextMenu.appendItem(WebInspector.UIString("Reveal in Debugger Tab"), revealInSidebar);
</span></span></pre>
</div>
</div>
</body>
</html>