Web Inspector: REGRESSION: DOMDebugger: breakpoints are forcibly enabled when resolvi...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2019 03:50:40 +0000 (03:50 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2019 03:50:40 +0000 (03:50 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200639

Reviewed by Joseph Pecoraro.

Since DOM breakpoints revolve around a given DOM node, we attempt to restore DOM breakpoints
whenever new nodes are added by matching them to the path of the DOM breakpoint. When doing
so, we should be in a "temporarily restoring breakpoints" mode so that we don't forcibly
enable all breakpoints.

* UserInterface/Controllers/DOMDebuggerManager.js:
(WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
(WI.DOMDebuggerManager.prototype._nodeInserted):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248587 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/DOMDebuggerManager.js

index 7cb66fe..3b00e71 100644 (file)
@@ -1,5 +1,21 @@
 2019-08-12  Devin Rousso  <drousso@apple.com>
 
+        Web Inspector: REGRESSION: DOMDebugger: breakpoints are forcibly enabled when resolving DOM breakpoints for newly added nodes
+        https://bugs.webkit.org/show_bug.cgi?id=200639
+
+        Reviewed by Joseph Pecoraro.
+
+        Since DOM breakpoints revolve around a given DOM node, we attempt to restore DOM breakpoints
+        whenever new nodes are added by matching them to the path of the DOM breakpoint. When doing
+        so, we should be in a "temporarily restoring breakpoints" mode so that we don't forcibly
+        enable all breakpoints.
+
+        * UserInterface/Controllers/DOMDebuggerManager.js:
+        (WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
+        (WI.DOMDebuggerManager.prototype._nodeInserted):
+
+2019-08-12  Devin Rousso  <drousso@apple.com>
+
         Web Inspector: Elements: Styles: add space between media query and style icon
         https://bugs.webkit.org/show_bug.cgi?id=200623
 
index 7d54471..5765c17 100644 (file)
@@ -561,8 +561,12 @@ WI.DOMDebuggerManager = class DOMDebuggerManager extends WI.Object
                     return;
                 }
 
-                if (nodeIdentifier)
-                    this._resolveDOMBreakpoint(breakpoint, nodeIdentifier);
+                if (!nodeIdentifier)
+                    return;
+
+                this._restoringBreakpoints = true;
+                this._resolveDOMBreakpoint(breakpoint, nodeIdentifier);
+                this._restoringBreakpoints = false;
             });
         }
     }
@@ -826,7 +830,9 @@ WI.DOMDebuggerManager = class DOMDebuggerManager extends WI.Object
             if (breakpoint.path !== node.path())
                 continue;
 
+            this._restoringBreakpoints = true;
             this._resolveDOMBreakpoint(breakpoint, node.id);
+            this._restoringBreakpoints = false;
         }
     }