Title: [209698] trunk/Source/WebInspectorUI
- Revision
- 209698
- Author
- [email protected]
- Date
- 2016-12-11 20:59:18 -0800 (Sun, 11 Dec 2016)
Log Message
Web Inspector: ThreadTreeElement should have a "Resume" status button when paused
https://bugs.webkit.org/show_bug.cgi?id=165581
Reviewed by Joseph Pecoraro.
* UserInterface/Images/Resume.svg:
Fill/stroke should be unspecified so that both can be styled in CSS.
* UserInterface/Views/DebuggerDashboardView.css:
(.dashboard.debugger .navigation-bar .item.debugger-dashboard-pause.activated):
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume):
(.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume.activated):
Recreate original style which relied on 'fill="none"' being specified in the SVG.
* UserInterface/Views/ThreadTreeElement.css:
(.tree-outline > .item.thread .icon):
(.tree-outline > .item.thread .status-button.resume):
(.tree-outline > .item.thread .status-button.resume:active):
(.tree-outline:matches(:focus, .force-focus) > .item.thread.selected .status-button.resume):
(.tree-outline > .item.thread.selected .status-button.resume,):
(.details-section.call-stack .thread .icon): Deleted.
Status button styles. Colors match those of the goto-arrow button.
* UserInterface/Views/ThreadTreeElement.js:
(WebInspector.ThreadTreeElement.prototype.refresh):
Update status icon.
(WebInspector.ThreadTreeElement.prototype.oncontextmenu):
(WebInspector.ThreadTreeElement.prototype._updateStatus):
Add/remove status button based on paused state.
Stop propagation of "mousedown" events on the status button, to
prevent button press from selecting the tree element.
(WebInspector.ThreadTreeElement):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (209697 => 209698)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-12-12 04:58:02 UTC (rev 209697)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-12-12 04:59:18 UTC (rev 209698)
@@ -1,3 +1,39 @@
+2016-12-11 Matt Baker <[email protected]>
+
+ Web Inspector: ThreadTreeElement should have a "Resume" status button when paused
+ https://bugs.webkit.org/show_bug.cgi?id=165581
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Images/Resume.svg:
+ Fill/stroke should be unspecified so that both can be styled in CSS.
+
+ * UserInterface/Views/DebuggerDashboardView.css:
+ (.dashboard.debugger .navigation-bar .item.debugger-dashboard-pause.activated):
+ * UserInterface/Views/DebuggerSidebarPanel.css:
+ (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume):
+ (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume.activated):
+ Recreate original style which relied on 'fill="none"' being specified in the SVG.
+
+ * UserInterface/Views/ThreadTreeElement.css:
+ (.tree-outline > .item.thread .icon):
+ (.tree-outline > .item.thread .status-button.resume):
+ (.tree-outline > .item.thread .status-button.resume:active):
+ (.tree-outline:matches(:focus, .force-focus) > .item.thread.selected .status-button.resume):
+ (.tree-outline > .item.thread.selected .status-button.resume,):
+ (.details-section.call-stack .thread .icon): Deleted.
+ Status button styles. Colors match those of the goto-arrow button.
+
+ * UserInterface/Views/ThreadTreeElement.js:
+ (WebInspector.ThreadTreeElement.prototype.refresh):
+ Update status icon.
+ (WebInspector.ThreadTreeElement.prototype.oncontextmenu):
+ (WebInspector.ThreadTreeElement.prototype._updateStatus):
+ Add/remove status button based on paused state.
+ Stop propagation of "mousedown" events on the status button, to
+ prevent button press from selecting the tree element.
+ (WebInspector.ThreadTreeElement):
+
2016-12-11 Joseph Pecoraro <[email protected]>
Web Inspector: Move MainTarget and WorkerTarget to their own files
Modified: trunk/Source/WebInspectorUI/UserInterface/Images/Resume.svg (209697 => 209698)
--- trunk/Source/WebInspectorUI/UserInterface/Images/Resume.svg 2016-12-12 04:58:02 UTC (rev 209697)
+++ trunk/Source/WebInspectorUI/UserInterface/Images/Resume.svg 2016-12-12 04:59:18 UTC (rev 209698)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright © 2014 Apple Inc. All rights reserved. -->
<svg xmlns="http://www.w3.org/2000/svg" id="root" version="1.1" viewBox="0 0 15 15">
- <path fill="none" stroke="currentColor" d="M 6.5 2.5 L 6.5 12.5 L 14.5 7.5 L 6.5 2.5 Z"/>
- <rect fill="none" stroke="currentColor" x="0.5" y="2.5" width="3" height="10"/>
+ <path d="M 6.5 2.5 L 6.5 12.5 L 14.5 7.5 L 6.5 2.5 Z"/>
+ <rect x="0.5" y="2.5" width="3" height="10"/>
</svg>
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.css (209697 => 209698)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.css 2016-12-12 04:58:02 UTC (rev 209697)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerDashboardView.css 2016-12-12 04:59:18 UTC (rev 209698)
@@ -73,6 +73,11 @@
animation-name: none;
}
+.dashboard.debugger .navigation-bar .item.debugger-dashboard-pause.activated {
+ fill: none;
+ stroke: var(--glyph-color-active);
+}
+
@keyframes pulse-pause-button {
from { opacity: 0.7; transform: scale(1); }
to { opacity: 1; transform: scale(1.1); }
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css (209697 => 209698)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css 2016-12-12 04:58:02 UTC (rev 209697)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.css 2016-12-12 04:59:18 UTC (rev 209698)
@@ -43,6 +43,14 @@
stroke: var(--glyph-color-active);
}
+.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume {
+ fill: none;
+ stroke: var(--glyph-color);
+}
+.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume.activated {
+ stroke: var(--glyph-color-active);
+}
+
.sidebar > .panel.navigation.debugger .warning-banner {
text-align: center;
font-size: 11px;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ThreadTreeElement.css (209697 => 209698)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ThreadTreeElement.css 2016-12-12 04:58:02 UTC (rev 209697)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ThreadTreeElement.css 2016-12-12 04:59:18 UTC (rev 209698)
@@ -23,8 +23,30 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-.details-section.call-stack .thread .icon {
+.tree-outline > .item.thread .icon {
content: url(../Images/Thread.svg);
width: 15px;
height: 15px;
}
+
+.tree-outline > .item.thread .status-button.resume {
+ width: 11px;
+ height: 11px;
+ vertical-align: middle;
+ fill: hsla(0, 0%, 0%, 0.5);
+ stroke: none;
+ display: none;
+}
+
+.tree-outline > .item.thread .status-button.resume:active {
+ fill: hsla(0, 0%, 0%, 0.7);
+}
+
+.tree-outline:matches(:focus, .force-focus) > .item.thread.selected .status-button.resume {
+ fill: var(--selected-foreground-color);
+}
+
+.tree-outline > .item.thread.selected .status-button.resume,
+.tree-outline > .item.thread:hover .status-button.resume {
+ display: inline-block;
+}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ThreadTreeElement.js (209697 => 209698)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ThreadTreeElement.js 2016-12-12 04:58:02 UTC (rev 209697)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ThreadTreeElement.js 2016-12-12 04:59:18 UTC (rev 209698)
@@ -42,6 +42,8 @@
{
this.removeChildren();
+ this._updateStatus();
+
let targetData = WebInspector.debuggerManager.dataForTarget(this._target);
let callFrames = targetData.callFrames;
@@ -111,10 +113,34 @@
let targetData = WebInspector.debuggerManager.dataForTarget(this._target);
let contextMenu = WebInspector.ContextMenu.createFromEvent(event);
- if (DebuggerAgent.continueUntilNextRunLoop) {
- contextMenu.appendItem(WebInspector.UIString("Resume Thread"), () => {
- WebInspector.debuggerManager.continueUntilNextRunLoop(this._target);
- }, !targetData.paused);
+ contextMenu.appendItem(WebInspector.UIString("Resume Thread"), () => {
+ WebInspector.debuggerManager.continueUntilNextRunLoop(this._target);
+ }, !targetData.paused);
+ }
+
+ // Private
+
+ _updateStatus()
+ {
+ this.status = null;
+
+ if (!this.element)
+ return;
+
+ let targetData = WebInspector.debuggerManager.dataForTarget(this._target);
+ if (!targetData.paused)
+ return;
+
+ if (!this._statusButton) {
+ let tooltip = WebInspector.UIString("Resume Thread");
+ this._statusButton = new WebInspector.TreeElementStatusButton(useSVGSymbol("Images/Resume.svg", "resume", tooltip));
+ this._statusButton.addEventListener(WebInspector.TreeElementStatusButton.Event.Clicked, () => { WebInspector.debuggerManager.continueUntilNextRunLoop(this._target); });
+ this._statusButton.element.addEventListener("mousedown", (event) => {
+ // Prevent tree element from being selected.
+ event.stopPropagation();
+ });
}
+
+ this.status = this._statusButton.element;
}
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes