Changeset 242315 in webkit
- Timestamp:
- Mar 2, 2019 12:50:08 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r242314 r242315 1 2019-03-02 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Sources: breakpoints should be disabled when an audit is running 4 https://bugs.webkit.org/show_bug.cgi?id=195105 5 <rdar://problem/48441373> 6 7 Reviewed by Joseph Pecoraro. 8 9 * UserInterface/Views/SourcesNavigationSidebarPanel.js: 10 (WI.SourcesNavigationSidebarPanel): 11 (WI.SourcesNavigationSidebarPanel.prototype.closed): 12 (WI.SourcesNavigationSidebarPanel.prototype._updateTemporarilyDisabledBreakpointsButtons): Added. 13 (WI.SourcesNavigationSidebarPanel.prototype._updateBreakpointsDisabledBanner): 14 (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingWillStart): 15 (WI.SourcesNavigationSidebarPanel.prototype._handleTimelineCapturingStopped): 16 (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestScheduled): Added. 17 (WI.SourcesNavigationSidebarPanel.prototype._handleAuditManagerTestCompleted): Added. 18 * UserInterface/Views/SourcesNavigationSidebarPanel.css: 19 (.sidebar > .panel.navigation.sources > .content > .warning-banner + .warning-banner): Added. 20 21 * UserInterface/Views/DebuggerSidebarPanel.js: 22 (WI.DebuggerSidebarPanel): 23 1 24 2019-03-02 Devin Rousso <drousso@apple.com> 2 25 -
trunk/Source/WebInspectorUI/UserInterface/Views/DebuggerSidebarPanel.js
r242049 r242315 251 251 this._debuggerDidPause(null); 252 252 253 if (WI.timelineManager.isCapturing() && WI.debuggerManager.breakpointsDisabledTemporarily) 254 this._timelineCapturingWillStart(null); 253 if (WI.debuggerManager.breakpointsDisabledTemporarily) { 254 if (WI.timelineManager.isCapturing()) 255 this._timelineCapturingWillStart(); 256 257 if (WI.auditManager.runningState === WI.AuditManager.RunningState.Active || WI.auditManager.runningState === WI.AuditManager.RunningState.Stopping) 258 this._handleAuditManagerTestScheduled(); 259 } 255 260 256 261 this._updateBreakpointsDisabledBanner(); -
trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.css
r242049 r242315 63 63 } 64 64 65 .sidebar > .panel.navigation.sources > .content > .warning-banner + .warning-banner { 66 display: none; 67 } 68 65 69 .sidebar > .panel.navigation.sources > .content > .details-section { 66 70 padding-bottom: 1px; -
trunk/Source/WebInspectorUI/UserInterface/Views/SourcesNavigationSidebarPanel.js
r242049 r242315 95 95 96 96 this._timelineRecordingWarningElement = null; 97 this._auditTestWarningElement = null; 97 98 this._breakpointsDisabledWarningElement = null; 98 99 … … 257 258 WI.timelineManager.addEventListener(WI.TimelineManager.Event.CapturingStopped, this._handleTimelineCapturingStopped, this); 258 259 260 WI.auditManager.addEventListener(WI.AuditManager.Event.TestScheduled, this._handleAuditManagerTestScheduled, this); 261 WI.auditManager.addEventListener(WI.AuditManager.Event.TestCompleted, this._handleAuditManagerTestCompleted, this); 262 259 263 WI.cssManager.addEventListener(WI.CSSManager.Event.StyleSheetAdded, this._handleCSSStyleSheetAdded, this); 260 264 … … 316 320 this._handleDebuggerPaused(); 317 321 318 if (WI.timelineManager.isCapturing() && WI.debuggerManager.breakpointsDisabledTemporarily) 319 this._handleTimelineCapturingWillStart(); 322 if (WI.debuggerManager.breakpointsDisabledTemporarily) { 323 if (WI.timelineManager.isCapturing()) 324 this._handleTimelineCapturingWillStart(); 325 326 if (WI.auditManager.runningState === WI.AuditManager.RunningState.Active || WI.auditManager.runningState === WI.AuditManager.RunningState.Stopping) 327 this._handleAuditManagerTestScheduled(); 328 } 320 329 321 330 this._updateBreakpointsDisabledBanner(); … … 349 358 WI.consoleManager.removeEventListener(null, null, this); 350 359 WI.timelineManager.removeEventListener(null, null, this); 360 WI.auditManager.removeEventListener(null, null, this); 351 361 WI.cssManager.removeEventListener(null, null, this); 352 362 WI.targetManager.removeEventListener(null, null, this); … … 926 936 } 927 937 938 _updateTemporarilyDisabledBreakpointsButtons() 939 { 940 let breakpointsDisabledTemporarily = WI.debuggerManager.breakpointsDisabledTemporarily; 941 this._debuggerBreakpointsButtonItem.enabled = !breakpointsDisabledTemporarily; 942 this._debuggerPauseResumeButtonItem.enabled = !breakpointsDisabledTemporarily; 943 } 944 928 945 _updateBreakpointsDisabledBanner() 929 946 { 930 if (!WI.debuggerManager.breakpointsEnabled && !this._timelineRecordingWarningElement ) {947 if (!WI.debuggerManager.breakpointsEnabled && !this._timelineRecordingWarningElement && !this._auditTestWarningElement) { 931 948 if (!this._breakpointsDisabledWarningElement) { 932 949 let enableBreakpointsButton = document.createElement("button"); … … 1608 1625 _handleTimelineCapturingWillStart(event) 1609 1626 { 1610 this._debuggerBreakpointsButtonItem.enabled = false; 1611 this._debuggerPauseResumeButtonItem.enabled = false; 1627 this._updateTemporarilyDisabledBreakpointsButtons(); 1612 1628 1613 1629 if (!this._timelineRecordingWarningElement) { … … 1630 1646 _handleTimelineCapturingStopped(event) 1631 1647 { 1632 this._debuggerBreakpointsButtonItem.enabled = true; 1633 this._debuggerPauseResumeButtonItem.enabled = true; 1648 this._updateTemporarilyDisabledBreakpointsButtons(); 1634 1649 1635 1650 if (this._timelineRecordingWarningElement) { 1636 1651 this._timelineRecordingWarningElement.remove(); 1637 1652 this._timelineRecordingWarningElement = null; 1653 } 1654 1655 this._updateBreakpointsDisabledBanner(); 1656 } 1657 1658 _handleAuditManagerTestScheduled(event) 1659 { 1660 this._updateTemporarilyDisabledBreakpointsButtons(); 1661 1662 if (!this._auditTestWarningElement) { 1663 let stopAuditButton = document.createElement("button"); 1664 stopAuditButton.textContent = WI.UIString("Stop Audit"); 1665 stopAuditButton.addEventListener("click", (event) => { 1666 WI.auditManager.stop(); 1667 }); 1668 1669 this._auditTestWarningElement = document.createElement("div"); 1670 this._auditTestWarningElement.classList.add("warning-banner"); 1671 this._auditTestWarningElement.append(WI.UIString("Debugger disabled during Audit"), document.createElement("br"), stopAuditButton); 1672 } 1673 1674 this.contentView.element.insertBefore(this._auditTestWarningElement, this.contentView.element.firstChild); 1675 1676 this._updateBreakpointsDisabledBanner(); 1677 } 1678 1679 _handleAuditManagerTestCompleted(event) 1680 { 1681 this._updateTemporarilyDisabledBreakpointsButtons(); 1682 1683 if (this._auditTestWarningElement) { 1684 this._auditTestWarningElement.remove(); 1685 this._auditTestWarningElement = null; 1638 1686 } 1639 1687
Note: See TracChangeset
for help on using the changeset viewer.