Diff
Modified: branches/safari-611.1.4-branch/Source/WebInspectorUI/ChangeLog (269011 => 269012)
--- branches/safari-611.1.4-branch/Source/WebInspectorUI/ChangeLog 2020-10-27 01:13:10 UTC (rev 269011)
+++ branches/safari-611.1.4-branch/Source/WebInspectorUI/ChangeLog 2020-10-27 01:13:13 UTC (rev 269012)
@@ -1,5 +1,64 @@
2020-10-26 Alan Coon <[email protected]>
+ Cherry-pick r268885. rdar://problem/70702192
+
+ Web Inspector: REGRESSION(r266074): Sources: icon for non-_javascript_ breakpoints doesn't change when breakpoints are globally disabled
+ https://bugs.webkit.org/show_bug.cgi?id=218064
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Models/Breakpoint.js:
+ (WI.Breakpoint.prototype.get resolved): Added.
+ * UserInterface/Models/_javascript_Breakpoint.js:
+ (WI._javascript_Breakpoint.prototype.get resolved):
+ Add `get resolved` to the base class based on `WI.debuggerManager.breakpointsEnabled`. Use
+ it in the subclass as part of the result.
+
+ * UserInterface/Views/BreakpointTreeElement.js:
+ (WI.BreakpointTreeElement.prototype.updateStatus):
+ (WI.BreakpointTreeElement.prototype._dataUpdated):
+ * UserInterface/Views/BreakpointTreeElement.css:
+ (.item.breakpoint .status > .status-image:not(.resolved)): Added.
+ * UserInterface/Views/_javascript_BreakpointTreeElement.css:
+ (.item.breakpoint._javascript_ .status > .status-image): Deleted.
+ (.item.breakpoint._javascript_ .status > .status-image.resolved): Deleted.
+ * UserInterface/Views/_javascript_BreakpointTreeElement.js:
+ (WI._javascript_BreakpointTreeElement.prototype.updateStatus): Deleted.
+ Eliminate unnecessary protected function now that all breakpoints have a `get resolved`.
+ Drive-by: inline CSS class name constants.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-10-22 Devin Rousso <[email protected]>
+
+ Web Inspector: REGRESSION(r266074): Sources: icon for non-_javascript_ breakpoints doesn't change when breakpoints are globally disabled
+ https://bugs.webkit.org/show_bug.cgi?id=218064
+
+ Reviewed by Joseph Pecoraro.
+
+ * UserInterface/Models/Breakpoint.js:
+ (WI.Breakpoint.prototype.get resolved): Added.
+ * UserInterface/Models/_javascript_Breakpoint.js:
+ (WI._javascript_Breakpoint.prototype.get resolved):
+ Add `get resolved` to the base class based on `WI.debuggerManager.breakpointsEnabled`. Use
+ it in the subclass as part of the result.
+
+ * UserInterface/Views/BreakpointTreeElement.js:
+ (WI.BreakpointTreeElement.prototype.updateStatus):
+ (WI.BreakpointTreeElement.prototype._dataUpdated):
+ * UserInterface/Views/BreakpointTreeElement.css:
+ (.item.breakpoint .status > .status-image:not(.resolved)): Added.
+ * UserInterface/Views/_javascript_BreakpointTreeElement.css:
+ (.item.breakpoint._javascript_ .status > .status-image): Deleted.
+ (.item.breakpoint._javascript_ .status > .status-image.resolved): Deleted.
+ * UserInterface/Views/_javascript_BreakpointTreeElement.js:
+ (WI._javascript_BreakpointTreeElement.prototype.updateStatus): Deleted.
+ Eliminate unnecessary protected function now that all breakpoints have a `get resolved`.
+ Drive-by: inline CSS class name constants.
+
+2020-10-26 Alan Coon <[email protected]>
+
Cherry-pick r268786. rdar://problem/70702339
Web Inspector: REGRESSION(r266074): Uncaught Exception: undefined is not an object (evaluating 'this._allListenersBreakpoint.disabled')
Modified: branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js (269011 => 269012)
--- branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js 2020-10-27 01:13:10 UTC (rev 269011)
+++ branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Models/Breakpoint.js 2020-10-27 01:13:13 UTC (rev 269012)
@@ -96,6 +96,12 @@
return false;
}
+ get resolved()
+ {
+ // Overridden by subclasses if needed.
+ return WI.debuggerManager.breakpointsEnabled;
+ }
+
get disabled()
{
return this._disabled;
Modified: branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Models/_javascript_Breakpoint.js (269011 => 269012)
--- branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Models/_javascript_Breakpoint.js 2020-10-27 01:13:10 UTC (rev 269011)
+++ branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Models/_javascript_Breakpoint.js 2020-10-27 01:13:13 UTC (rev 269012)
@@ -189,7 +189,7 @@
get resolved()
{
- return this._resolved;
+ return super.resolved && this._resolved;
}
set resolved(resolved)
Modified: branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.css (269011 => 269012)
--- branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.css 2020-10-27 01:13:10 UTC (rev 269011)
+++ branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.css 2020-10-27 01:13:13 UTC (rev 269012)
@@ -50,6 +50,10 @@
fill: var(--breakpoint-color-disabled);
}
+.item.breakpoint .status > .status-image:not(.resolved) {
+ filter: grayscale();
+}
+
.item.breakpoint.paused .icon {
content: url(../Images/TypeIcons.svg#PausedBreakpoint-light);
}
Modified: branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js (269011 => 269012)
--- branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js 2020-10-27 01:13:10 UTC (rev 269011)
+++ branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/BreakpointTreeElement.js 2020-10-27 01:13:13 UTC (rev 269012)
@@ -49,7 +49,7 @@
this._listenerSet.register(WI.debuggerManager, WI.DebuggerManager.Event.ProbeSetRemoved, this._probeSetRemoved);
this.status = WI.ImageUtilities.useSVGSymbol("Images/Breakpoint.svg");
- this.status.className = WI.BreakpointTreeElement.StatusImageElementStyleClassName;
+ this.status.className = "status-image";
this._listenerSet.register(this.status, "mousedown", this._statusImageElementMouseDown);
this._listenerSet.register(this.status, "click", this._statusImageElementClicked);
@@ -138,9 +138,10 @@
if (!this.status)
return;
- this.status.classList.toggle(WI.BreakpointTreeElement.StatusImageDisabledStyleClassName, this._breakpoint.disabled);
+ this.status.classList.toggle("resolved", this._breakpoint.resolved);
+ this.status.classList.toggle("disabled", this._breakpoint.disabled);
if (this._breakpoint.editable)
- this.status.classList.toggle(WI.BreakpointTreeElement.StatusImageAutoContinueStyleClassName, this._breakpoint.autoContinue);
+ this.status.classList.toggle("auto-continue", this._breakpoint.autoContinue);
}
// Private
@@ -191,9 +192,9 @@
_dataUpdated()
{
- if (this.element.classList.contains(WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName)) {
+ if (this.element.classList.contains("data-updated")) {
clearTimeout(this._removeIconAnimationTimeoutIdentifier);
- this.element.classList.remove(WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName);
+ this.element.classList.remove("data-updated");
// We want to restart the animation, which can only be done by removing the class,
// performing layout, and re-adding the class. Try adding class back on next run loop.
window.requestAnimationFrame(this._dataUpdated.bind(this));
@@ -200,9 +201,9 @@
return;
}
- this.element.classList.add(WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName);
+ this.element.classList.add("data-updated");
this._removeIconAnimationTimeoutIdentifier = setTimeout(() => {
- this.element.classList.remove(WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName);
+ this.element.classList.remove("data-updated");
}, WI.BreakpointTreeElement.ProbeDataUpdatedAnimationDuration);
}
@@ -218,9 +219,4 @@
}
};
-WI.BreakpointTreeElement.StatusImageElementStyleClassName = "status-image";
-WI.BreakpointTreeElement.StatusImageAutoContinueStyleClassName = "auto-continue";
-WI.BreakpointTreeElement.StatusImageDisabledStyleClassName = "disabled";
-WI.BreakpointTreeElement.ProbeDataUpdatedStyleClassName = "data-updated";
-
WI.BreakpointTreeElement.ProbeDataUpdatedAnimationDuration = 400; // milliseconds
Modified: branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/_javascript_BreakpointTreeElement.css (269011 => 269012)
--- branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/_javascript_BreakpointTreeElement.css 2020-10-27 01:13:10 UTC (rev 269011)
+++ branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/_javascript_BreakpointTreeElement.css 2020-10-27 01:13:13 UTC (rev 269012)
@@ -23,14 +23,6 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-.item.breakpoint._javascript_ .status > .status-image {
- filter: grayscale();
-}
-
-.item.breakpoint._javascript_ .status > .status-image.resolved {
- filter: none;
-}
-
body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.breakpoint._javascript_.selected .status > .status-image.resolved {
stroke: var(--selected-foreground-color);
}
Modified: branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/_javascript_BreakpointTreeElement.js (269011 => 269012)
--- branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/_javascript_BreakpointTreeElement.js 2020-10-27 01:13:10 UTC (rev 269011)
+++ branches/safari-611.1.4-branch/Source/WebInspectorUI/UserInterface/Views/_javascript_BreakpointTreeElement.js 2020-10-27 01:13:13 UTC (rev 269012)
@@ -52,18 +52,6 @@
return {text: [this.breakpoint.contentIdentifier]};
}
- // Protected
-
- updateStatus()
- {
- super.updateStatus();
-
- if (!this.status)
- return;
-
- this.status.classList.toggle("resolved", this.breakpoint.resolved && WI.debuggerManager.breakpointsEnabled);
- }
-
// Private
_updateTitles()