Skip to content
Permalink
Browse files
Unreviewed, reverting r249538 & r249598.
https://bugs.webkit.org/show_bug.cgi?id=240769

Introduced inconsistencies between backend and frontend DOM tree state.

Reverted changesets:

"Web Inspector: preserve DOM.NodeId if a node is removed and re-added"
https://bugs.webkit.org/show_bug.cgi?id=189687
https://commits.webkit.org/249538

"Web Inspector: Clean up `WI.DOMNode` to no longer require the shared `WI.DOMManager` be passed during construction"
https://bugs.webkit.org/show_bug.cgi?id=239129
https://commits.webkit.org/249598

Canonical link: https://commits.webkit.org/250847@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
patrickangle committed May 22, 2022
1 parent 1d98cdb commit f367befb2eee7192e73f85d8b5ae74410eb8dfa5
Showing 10 changed files with 109 additions and 158 deletions.
@@ -16,25 +16,19 @@ PASS: Pause targetNodeId should be expected value.
CALL STACK:
0: [F] testNodeRemovedAncestor
1: [P] Global Code
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
-- Running test teardown.

-- Running test case: DOMBreakpoint.NodeRemoved.Ancestor.BreakpointDisabled
Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV,0,DIV" DOM Breakpoint...
Disabling breakpoint...
Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should not pause for disabled breakpoint.
-- Running test teardown.

-- Running test case: DOMBreakpoint.NodeRemoved.Ancestor.DebuggerDisabled
Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV,0,DIV" DOM Breakpoint...
Disabling all breakpoints...
Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
Enabling all breakpoints...
PASS: Should not pause when all breakpoints disabled.
-- Running test teardown.
@@ -52,25 +46,17 @@ Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV,0,DIV" DOM Breakpoint...
Setting condition to 'false'...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should not pause.

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should not pause.

Setting condition to 'true'...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should pause.

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should pause.

-- Running test case: DOMBreakpoint.NodeRemoved.Ancestor.Options.Condition.ConsoleCommandLineAPI
@@ -80,26 +66,18 @@ Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV,0,DIV" DOM Breakpoint...
Setting condition to saved console value...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should not pause.

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should not pause.

Adding saved console value 'true'...
Setting condition to saved console value...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should pause.

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should pause.

-- Running test case: DOMBreakpoint.NodeRemoved.Ancestor.Options.Action.Log
@@ -108,33 +86,25 @@ Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV,0,DIV" DOM Breakpoint...
Adding log action...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should pause.

Editing log action...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should pause.

Editing log action...
Enabling auto-continue...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should not pause.

Editing log action...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should not pause.

@@ -144,33 +114,25 @@ Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV,0,DIV" DOM Breakpoint...
Adding evaluate action...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should pause.

Editing evaluate action...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should pause.

Editing evaluate action...
Enabling auto-continue...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should not pause.

Editing evaluate action...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should not pause.

@@ -181,17 +143,13 @@ Adding "node-removed:1,HTML,1,BODY,1,DIV,0,DIV,0,DIV" DOM Breakpoint...
Adding evaluate action using saved console value...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should pause.

Adding saved console value '2'...
Editing evaluate action using saved console value...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should pause.

@@ -200,17 +158,13 @@ Editing evaluate action using saved console value...
Enabling auto-continue...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should not pause.

Adding saved console value '4'...
Editing evaluate action using saved console value...

Triggering breakpoint...
Breakpoint "domNode" set to "null".
Breakpoint "domNode" set to "div#node-removed-ancestor-test".
PASS: Should execute breakpoint action.
PASS: Should not pause.

@@ -46,6 +46,8 @@

await InspectorTest.evaluateInPage(`testNodeRemovedAncestor()`);

InspectorTest.assert(!breakpoint.domNode, "Should not have domNode.");

InspectorTest.assert(paused, "Should pause.");
WI.debuggerManager.removeEventListener(WI.DebuggerManager.Event.Paused, pausedListener);
},
@@ -70,9 +72,13 @@
InspectorTest.log("Disabling breakpoint...");
breakpoint.disabled = true;

InspectorTest.assert(breakpoint.domNode === node, "Should have domNode.");

InspectorTest.log("Triggering breakpoint...");
await InspectorTest.evaluateInPage(`testNodeRemovedAncestor()`);

InspectorTest.assert(!breakpoint.domNode, "Should not have domNode.");

InspectorTest.expectFalse(paused, "Should not pause for disabled breakpoint.");
WI.debuggerManager.removeEventListener(WI.DebuggerManager.Event.Paused, pausedListener);
},
@@ -100,6 +106,8 @@
InspectorTest.log("Triggering breakpoint...");
await InspectorTest.evaluateInPage(`testNodeRemovedAncestor()`);

InspectorTest.assert(!breakpoint.domNode, "Should not have domNode.");

InspectorTest.log("Enabling all breakpoints...");
await DebuggerAgent.setBreakpointsActive(true);

@@ -127,9 +135,13 @@
InspectorTest.log("Removing breakpoint...");
WI.domDebuggerManager.removeDOMBreakpoint(breakpoint);

InspectorTest.assert(!breakpoint.domNode, "Should not have domNode.");

InspectorTest.log("Triggering breakpoint...");
await InspectorTest.evaluateInPage(`testNodeRemovedAncestor()`);

InspectorTest.assert(!breakpoint.domNode, "Should not have domNode.");

InspectorTest.expectFalse(paused, "Should not pause for removed breakpoint.");
WI.debuggerManager.removeEventListener(WI.DebuggerManager.Event.Paused, pausedListener);
},

0 comments on commit f367bef

Please sign in to comment.