Title: [214256] trunk/Source/WebInspectorUI
- Revision
- 214256
- Author
- [email protected]
- Date
- 2017-03-22 10:41:11 -0700 (Wed, 22 Mar 2017)
Log Message
Web Inspector: Clicking DOM breakpoint marker should enable/disable breakpoints
https://bugs.webkit.org/show_bug.cgi?id=169856
<rdar://problem/31133090>
Reviewed by Joseph Pecoraro.
Clicking DOM breakpoint marker should enable/disable breakpoints,
matching the behavior of the marker's context menu:
- If one or more breakpoints are disabled, click enables all
- If all breakpoints are enabled, click disables all
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._updateBreakpointStatus):
(WebInspector.DOMTreeElement.prototype._statusImageClicked):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (214255 => 214256)
--- trunk/Source/WebInspectorUI/ChangeLog 2017-03-22 17:19:28 UTC (rev 214255)
+++ trunk/Source/WebInspectorUI/ChangeLog 2017-03-22 17:41:11 UTC (rev 214256)
@@ -1,3 +1,21 @@
+2017-03-22 Matt Baker <[email protected]>
+
+ Web Inspector: Clicking DOM breakpoint marker should enable/disable breakpoints
+ https://bugs.webkit.org/show_bug.cgi?id=169856
+ <rdar://problem/31133090>
+
+ Reviewed by Joseph Pecoraro.
+
+ Clicking DOM breakpoint marker should enable/disable breakpoints,
+ matching the behavior of the marker's context menu:
+
+ - If one or more breakpoints are disabled, click enables all
+ - If all breakpoints are enabled, click disables all
+
+ * UserInterface/Views/DOMTreeElement.js:
+ (WebInspector.DOMTreeElement.prototype._updateBreakpointStatus):
+ (WebInspector.DOMTreeElement.prototype._statusImageClicked):
+
2017-03-20 Devin Rousso <[email protected]>
Web Inspector: RTL: minor layout issues in Breakpoint Editor popover
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (214255 => 214256)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2017-03-22 17:19:28 UTC (rev 214255)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2017-03-22 17:41:11 UTC (rev 214256)
@@ -1684,6 +1684,7 @@
if (!this._statusImageElement) {
this._statusImageElement = useSVGSymbol("Images/DOMBreakpoint.svg", "status-image");
this._statusImageElement.classList.add("breakpoint");
+ this._statusImageElement.addEventListener("click", this._statusImageClicked.bind(this));
this._statusImageElement.addEventListener("contextmenu", this._statusImageContextmenu.bind(this));
this._statusImageElement.addEventListener("mousedown", (event) => { event.stopPropagation(); });
}
@@ -1694,6 +1695,19 @@
this._statusImageElement.classList.toggle("disabled", disabled);
}
+ _statusImageClicked(event)
+ {
+ if (event.button !== 0 || event.ctrlKey)
+ return;
+
+ let breakpoints = WebInspector.domDebuggerManager.domBreakpointsForNode(this.representedObject);
+ if (!breakpoints || !breakpoints.length)
+ return;
+
+ let shouldEnable = breakpoints.some((breakpoint) => breakpoint.disabled);
+ breakpoints.forEach((breakpoint) => breakpoint.disabled = !shouldEnable);
+ }
+
_statusImageContextmenu(event)
{
const allowEditing = true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes