Changeset 268885 in webkit
- Timestamp:
- Oct 22, 2020, 1:09:03 PM (6 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 7 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Models/Breakpoint.js (modified) (1 diff)
-
UserInterface/Models/JavaScriptBreakpoint.js (modified) (1 diff)
-
UserInterface/Views/BreakpointTreeElement.css (modified) (1 diff)
-
UserInterface/Views/BreakpointTreeElement.js (modified) (5 diffs)
-
UserInterface/Views/JavaScriptBreakpointTreeElement.css (modified) (1 diff)
-
UserInterface/Views/JavaScriptBreakpointTreeElement.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r268786 r268885 1 2020-10-22 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: REGRESSION(r266074): Sources: icon for non-JavaScript breakpoints doesn't change when breakpoints are globally disabled 4 https://bugs.webkit.org/show_bug.cgi?id=218064 5 6 Reviewed by Joseph Pecoraro. 7 8 * UserInterface/Models/Breakpoint.js: 9 (WI.Breakpoint.prototype.get resolved): Added. 10 * UserInterface/Models/JavaScriptBreakpoint.js: 11 (WI.JavaScriptBreakpoint.prototype.get resolved): 12 Add `get resolved` to the base class based on `WI.debuggerManager.breakpointsEnabled`. Use 13 it in the subclass as part of the result. 14 15 * UserInterface/Views/BreakpointTreeElement.js: 16 (WI.BreakpointTreeElement.prototype.updateStatus): 17 (WI.BreakpointTreeElement.prototype._dataUpdated): 18 * UserInterface/Views/BreakpointTreeElement.css: 19 (.item.breakpoint .status > .status-image:not(.resolved)): Added. 20 * UserInterface/Views/JavaScriptBreakpointTreeElement.css: 21 (.item.breakpoint.javascript .status > .status-image): Deleted. 22 (.item.breakpoint.javascript .status > .status-image.resolved): Deleted. 23 * UserInterface/Views/JavaScriptBreakpointTreeElement.js: 24 (WI.JavaScriptBreakpointTreeElement.prototype.updateStatus): Deleted. 25 Eliminate unnecessary protected function now that all breakpoints have a `get resolved`. 26 Drive-by: inline CSS class name constants. 27 1 28 2020-10-20 Devin Rousso <drousso@apple.com> 2 29 -
trunk/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js
r266534 r268885 97 97 } 98 98 99 get resolved() 100 { 101 // Overridden by subclasses if needed. 102 return WI.debuggerManager.breakpointsEnabled; 103 } 104 99 105 get disabled() 100 106 { -
trunk/Source/WebInspectorUI/UserInterface/Models/JavaScriptBreakpoint.js
r266534 r268885 190 190 get resolved() 191 191 { 192 return this._resolved;192 return super.resolved && this._resolved; 193 193 } 194 194 -
trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.css
r266074 r268885 51 51 } 52 52 53 .item.breakpoint .status > .status-image:not(.resolved) { 54 filter: grayscale(); 55 } 56 53 57 .item.breakpoint.paused .icon { 54 58 content: url(../Images/TypeIcons.svg#PausedBreakpoint-light); -
trunk/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js
r268626 r268885 50 50 51 51 this.status = WI.ImageUtilities.useSVGSymbol("Images/Breakpoint.svg"); 52 this.status.className = WI.BreakpointTreeElement.StatusImageElementStyleClassName;52 this.status.className = "status-image"; 53 53 54 54 this._listenerSet.register(this.status, "mousedown", this._statusImageElementMouseDown); … … 139 139 return; 140 140 141 this.status.classList.toggle(WI.BreakpointTreeElement.StatusImageDisabledStyleClassName, this._breakpoint.disabled); 141 this.status.classList.toggle("resolved", this._breakpoint.resolved); 142 this.status.classList.toggle("disabled", this._breakpoint.disabled); 142 143 if (this._breakpoint.editable) 143 this.status.classList.toggle( WI.BreakpointTreeElement.StatusImageAutoContinueStyleClassName, this._breakpoint.autoContinue);144 this.status.classList.toggle("auto-continue", this._breakpoint.autoContinue); 144 145 } 145 146 … … 192 193 _dataUpdated() 193 194 { 194 if (this.element.classList.contains( WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName)) {195 if (this.element.classList.contains("data-updated")) { 195 196 clearTimeout(this._removeIconAnimationTimeoutIdentifier); 196 this.element.classList.remove( WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName);197 this.element.classList.remove("data-updated"); 197 198 // We want to restart the animation, which can only be done by removing the class, 198 199 // performing layout, and re-adding the class. Try adding class back on next run loop. … … 201 202 } 202 203 203 this.element.classList.add( WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName);204 this.element.classList.add("data-updated"); 204 205 this._removeIconAnimationTimeoutIdentifier = setTimeout(() => { 205 this.element.classList.remove( WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName);206 this.element.classList.remove("data-updated"); 206 207 }, WI.BreakpointTreeElement.ProbeDataUpdatedAnimationDuration); 207 208 } … … 219 220 }; 220 221 221 WI.BreakpointTreeElement.StatusImageElementStyleClassName = "status-image";222 WI.BreakpointTreeElement.StatusImageAutoContinueStyleClassName = "auto-continue";223 WI.BreakpointTreeElement.StatusImageDisabledStyleClassName = "disabled";224 WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName = "data-updated";225 226 222 WI.BreakpointTreeElement.ProbeDataUpdatedAnimationDuration = 400; // milliseconds -
trunk/Source/WebInspectorUI/UserInterface/Views/JavaScriptBreakpointTreeElement.css
r266074 r268885 23 23 * THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 .item.breakpoint.javascript .status > .status-image {27 filter: grayscale();28 }29 30 .item.breakpoint.javascript .status > .status-image.resolved {31 filter: none;32 }33 25 34 26 body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.breakpoint.javascript.selected .status > .status-image.resolved { -
trunk/Source/WebInspectorUI/UserInterface/Views/JavaScriptBreakpointTreeElement.js
r268626 r268885 53 53 } 54 54 55 // Protected56 57 updateStatus()58 {59 super.updateStatus();60 61 if (!this.status)62 return;63 64 this.status.classList.toggle("resolved", this.breakpoint.resolved && WI.debuggerManager.breakpointsEnabled);65 }66 67 55 // Private 68 56
Note:
See TracChangeset
for help on using the changeset viewer.