From 90fa6be2509f68fa05897324e6adbab57de30c0f Mon Sep 17 00:00:00 2001 From: Jan Kassens Date: Wed, 19 Apr 2023 19:45:35 -0400 Subject: [PATCH] Remove findInstanceBlockingEvent unused parameters (#26534) This reverts commit 682e67edd4c12e2fbf2f1617815ebcc7c809e511. --- .../src/events/ReactDOMEventListener.js | 17 ++--------------- .../src/events/ReactDOMEventReplaying.js | 8 +------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/packages/react-dom-bindings/src/events/ReactDOMEventListener.js b/packages/react-dom-bindings/src/events/ReactDOMEventListener.js index e84dde189a9e1..c93c34b0a28ab 100644 --- a/packages/react-dom-bindings/src/events/ReactDOMEventListener.js +++ b/packages/react-dom-bindings/src/events/ReactDOMEventListener.js @@ -155,12 +155,7 @@ export function dispatchEvent( return; } - let blockedOn = findInstanceBlockingEvent( - domEventName, - eventSystemFlags, - targetContainer, - nativeEvent, - ); + let blockedOn = findInstanceBlockingEvent(nativeEvent); if (blockedOn === null) { dispatchEventForPluginEventSystem( domEventName, @@ -198,12 +193,7 @@ export function dispatchEvent( if (fiber !== null) { attemptSynchronousHydration(fiber); } - const nextBlockedOn = findInstanceBlockingEvent( - domEventName, - eventSystemFlags, - targetContainer, - nativeEvent, - ); + const nextBlockedOn = findInstanceBlockingEvent(nativeEvent); if (nextBlockedOn === null) { dispatchEventForPluginEventSystem( domEventName, @@ -240,9 +230,6 @@ export let return_targetInst: null | Fiber = null; // Returns a SuspenseInstance or Container if it's blocked. // The return_targetInst field above is conceptually part of the return value. export function findInstanceBlockingEvent( - domEventName: DOMEventName, - eventSystemFlags: EventSystemFlags, - targetContainer: EventTarget, nativeEvent: AnyNativeEvent, ): null | Container | SuspenseInstance { // TODO: Warn if _enabled is false. diff --git a/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js b/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js index b4ad4a926e621..3e91e174c4fd5 100644 --- a/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js +++ b/packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js @@ -376,13 +376,7 @@ function attemptReplayContinuousQueuedEvent( } const targetContainers = queuedEvent.targetContainers; while (targetContainers.length > 0) { - const targetContainer = targetContainers[0]; - const nextBlockedOn = findInstanceBlockingEvent( - queuedEvent.domEventName, - queuedEvent.eventSystemFlags, - targetContainer, - queuedEvent.nativeEvent, - ); + const nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent); if (nextBlockedOn === null) { const nativeEvent = queuedEvent.nativeEvent; const nativeEventClone = new nativeEvent.constructor(