diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 94f7d42288038..6869e9e07b1f3 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -2f240c91ed54900adee213565cb2039e161629e9 +3bcd2de01b5716202eabe8faa338f51bdc59ce26 diff --git a/compiled/facebook-www/React-prod.modern.js b/compiled/facebook-www/React-prod.modern.js index bf8353f892885..8f190168f2a53 100644 --- a/compiled/facebook-www/React-prod.modern.js +++ b/compiled/facebook-www/React-prod.modern.js @@ -617,4 +617,4 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-modern-e541e76b"; +exports.version = "18.3.0-www-modern-29517cf7"; diff --git a/compiled/facebook-www/React-profiling.modern.js b/compiled/facebook-www/React-profiling.modern.js index 67eaea175144a..eef4c6f93afaa 100644 --- a/compiled/facebook-www/React-profiling.modern.js +++ b/compiled/facebook-www/React-profiling.modern.js @@ -621,7 +621,7 @@ exports.useSyncExternalStore = function ( exports.useTransition = function () { return ReactCurrentDispatcher.current.useTransition(); }; -exports.version = "18.3.0-www-modern-4a897bb7"; +exports.version = "18.3.0-www-modern-9c6d816f"; "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && diff --git a/compiled/facebook-www/Scheduler-dev.classic.js b/compiled/facebook-www/Scheduler-dev.classic.js index 6c6f646a309ab..fb0d7edac563a 100644 --- a/compiled/facebook-www/Scheduler-dev.classic.js +++ b/compiled/facebook-www/Scheduler-dev.classic.js @@ -31,13 +31,8 @@ if (__DEV__) { var userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout, - enableIsInputPending = dynamicFeatureFlags.enableIsInputPending, - enableIsInputPendingContinuous = - dynamicFeatureFlags.enableIsInputPendingContinuous, - frameYieldMs = dynamicFeatureFlags.frameYieldMs, - continuousYieldMs = dynamicFeatureFlags.continuousYieldMs, - maxYieldMs = dynamicFeatureFlags.maxYieldMs; + lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; + var frameYieldMs = 10; var enableProfiling = enableProfilingFeatureFlag; function push(heap, node) { @@ -297,16 +292,6 @@ if (__DEV__) { var localSetImmediate = typeof setImmediate !== "undefined" ? setImmediate : null; // IE and Node.js + jsdom - var isInputPending = - typeof navigator !== "undefined" && // $FlowFixMe[prop-missing] - navigator.scheduling !== undefined && // $FlowFixMe[incompatible-type] - navigator.scheduling.isInputPending !== undefined - ? navigator.scheduling.isInputPending.bind(navigator.scheduling) - : null; - var continuousOptions = { - includeContinuous: enableIsInputPendingContinuous - }; - function advanceTimers(currentTime) { // Check for tasks that are no longer delayed and add them to the queue. var timer = peek(timerQueue); @@ -684,10 +669,7 @@ if (__DEV__) { // need to be frame aligned; for those that do, use requestAnimationFrame. var frameInterval = frameYieldMs; - var continuousInputInterval = continuousYieldMs; - var maxInterval = maxYieldMs; var startTime = -1; - var needsPaint = false; function shouldYieldToHost() { var timeElapsed = exports.unstable_now() - startTime; @@ -696,54 +678,12 @@ if (__DEV__) { // The main thread has only been blocked for a really short amount of time; // smaller than a single frame. Don't yield yet. return false; - } // The main thread has been blocked for a non-negligible amount of time. We - // may want to yield control of the main thread, so the browser can perform - // high priority tasks. The main ones are painting and user input. If there's - // a pending paint or a pending input, then we should yield. But if there's - // neither, then we can yield less often while remaining responsive. We'll - // eventually yield regardless, since there could be a pending paint that - // wasn't accompanied by a call to `requestPaint`, or other main thread tasks - // like network events. - - if (enableIsInputPending) { - if (needsPaint) { - // There's a pending paint (signaled by `requestPaint`). Yield now. - return true; - } - - if (timeElapsed < continuousInputInterval) { - // We haven't blocked the thread for that long. Only yield if there's a - // pending discrete input (e.g. click). It's OK if there's pending - // continuous input (e.g. mouseover). - if (isInputPending !== null) { - return isInputPending(); - } - } else if (timeElapsed < maxInterval) { - // Yield if there's either a pending discrete or continuous input. - if (isInputPending !== null) { - return isInputPending(continuousOptions); - } - } else { - // We've blocked the thread for a long time. Even if there's no pending - // input, there may be some other scheduled work that we don't know about, - // like a network event. Yield now. - return true; - } - } // `isInputPending` isn't available. Yield now. + } // Yield now. return true; } - function requestPaint() { - if ( - enableIsInputPending && - navigator !== undefined && // $FlowFixMe[prop-missing] - navigator.scheduling !== undefined && // $FlowFixMe[incompatible-type] - navigator.scheduling.isInputPending !== undefined - ) { - needsPaint = true; - } // Since we yield every frame regardless, `requestPaint` has no effect. - } + function requestPaint() {} function forceFrameRate(fps) { if (fps < 0 || fps > 125) { @@ -788,10 +728,7 @@ if (__DEV__) { isMessageLoopRunning = false; } } - } // Yielding to the browser will give it a chance to paint, so we can - // reset this. - - needsPaint = false; + } }; var schedulePerformWorkUntilDeadline; diff --git a/compiled/facebook-www/Scheduler-dev.modern.js b/compiled/facebook-www/Scheduler-dev.modern.js index 6c6f646a309ab..fb0d7edac563a 100644 --- a/compiled/facebook-www/Scheduler-dev.modern.js +++ b/compiled/facebook-www/Scheduler-dev.modern.js @@ -31,13 +31,8 @@ if (__DEV__) { var userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout, - enableIsInputPending = dynamicFeatureFlags.enableIsInputPending, - enableIsInputPendingContinuous = - dynamicFeatureFlags.enableIsInputPendingContinuous, - frameYieldMs = dynamicFeatureFlags.frameYieldMs, - continuousYieldMs = dynamicFeatureFlags.continuousYieldMs, - maxYieldMs = dynamicFeatureFlags.maxYieldMs; + lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; + var frameYieldMs = 10; var enableProfiling = enableProfilingFeatureFlag; function push(heap, node) { @@ -297,16 +292,6 @@ if (__DEV__) { var localSetImmediate = typeof setImmediate !== "undefined" ? setImmediate : null; // IE and Node.js + jsdom - var isInputPending = - typeof navigator !== "undefined" && // $FlowFixMe[prop-missing] - navigator.scheduling !== undefined && // $FlowFixMe[incompatible-type] - navigator.scheduling.isInputPending !== undefined - ? navigator.scheduling.isInputPending.bind(navigator.scheduling) - : null; - var continuousOptions = { - includeContinuous: enableIsInputPendingContinuous - }; - function advanceTimers(currentTime) { // Check for tasks that are no longer delayed and add them to the queue. var timer = peek(timerQueue); @@ -684,10 +669,7 @@ if (__DEV__) { // need to be frame aligned; for those that do, use requestAnimationFrame. var frameInterval = frameYieldMs; - var continuousInputInterval = continuousYieldMs; - var maxInterval = maxYieldMs; var startTime = -1; - var needsPaint = false; function shouldYieldToHost() { var timeElapsed = exports.unstable_now() - startTime; @@ -696,54 +678,12 @@ if (__DEV__) { // The main thread has only been blocked for a really short amount of time; // smaller than a single frame. Don't yield yet. return false; - } // The main thread has been blocked for a non-negligible amount of time. We - // may want to yield control of the main thread, so the browser can perform - // high priority tasks. The main ones are painting and user input. If there's - // a pending paint or a pending input, then we should yield. But if there's - // neither, then we can yield less often while remaining responsive. We'll - // eventually yield regardless, since there could be a pending paint that - // wasn't accompanied by a call to `requestPaint`, or other main thread tasks - // like network events. - - if (enableIsInputPending) { - if (needsPaint) { - // There's a pending paint (signaled by `requestPaint`). Yield now. - return true; - } - - if (timeElapsed < continuousInputInterval) { - // We haven't blocked the thread for that long. Only yield if there's a - // pending discrete input (e.g. click). It's OK if there's pending - // continuous input (e.g. mouseover). - if (isInputPending !== null) { - return isInputPending(); - } - } else if (timeElapsed < maxInterval) { - // Yield if there's either a pending discrete or continuous input. - if (isInputPending !== null) { - return isInputPending(continuousOptions); - } - } else { - // We've blocked the thread for a long time. Even if there's no pending - // input, there may be some other scheduled work that we don't know about, - // like a network event. Yield now. - return true; - } - } // `isInputPending` isn't available. Yield now. + } // Yield now. return true; } - function requestPaint() { - if ( - enableIsInputPending && - navigator !== undefined && // $FlowFixMe[prop-missing] - navigator.scheduling !== undefined && // $FlowFixMe[incompatible-type] - navigator.scheduling.isInputPending !== undefined - ) { - needsPaint = true; - } // Since we yield every frame regardless, `requestPaint` has no effect. - } + function requestPaint() {} function forceFrameRate(fps) { if (fps < 0 || fps > 125) { @@ -788,10 +728,7 @@ if (__DEV__) { isMessageLoopRunning = false; } } - } // Yielding to the browser will give it a chance to paint, so we can - // reset this. - - needsPaint = false; + } }; var schedulePerformWorkUntilDeadline; diff --git a/compiled/facebook-www/Scheduler-prod.classic.js b/compiled/facebook-www/Scheduler-prod.classic.js index 939c97b2a08ea..3e030cf2c705f 100644 --- a/compiled/facebook-www/Scheduler-prod.classic.js +++ b/compiled/facebook-www/Scheduler-prod.classic.js @@ -14,13 +14,7 @@ var dynamicFeatureFlags = require("SchedulerFeatureFlags"), userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout, - enableIsInputPending = dynamicFeatureFlags.enableIsInputPending, - enableIsInputPendingContinuous = - dynamicFeatureFlags.enableIsInputPendingContinuous, - frameYieldMs = dynamicFeatureFlags.frameYieldMs, - continuousYieldMs = dynamicFeatureFlags.continuousYieldMs, - maxYieldMs = dynamicFeatureFlags.maxYieldMs; + lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; function push(heap, node) { var index = heap.length; heap.push(node); @@ -93,14 +87,7 @@ var taskQueue = [], isHostTimeoutScheduled = !1, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, - localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, - isInputPending = - "undefined" !== typeof navigator && - void 0 !== navigator.scheduling && - void 0 !== navigator.scheduling.isInputPending - ? navigator.scheduling.isInputPending.bind(navigator.scheduling) - : null, - continuousOptions = { includeContinuous: enableIsInputPendingContinuous }; + localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null; function advanceTimers(currentTime) { for (var timer = peek(timerQueue); null !== timer; ) { if (null === timer.callback) pop(timerQueue); @@ -126,20 +113,10 @@ function handleTimeout(currentTime) { } var isMessageLoopRunning = !1, taskTimeoutID = -1, - frameInterval = frameYieldMs, - startTime = -1, - needsPaint = !1; + frameInterval = 10, + startTime = -1; function shouldYieldToHost() { - var timeElapsed = exports.unstable_now() - startTime; - if (timeElapsed < frameInterval) return !1; - if (enableIsInputPending) { - if (needsPaint) return !0; - if (timeElapsed < continuousYieldMs) { - if (null !== isInputPending) return isInputPending(); - } else if (timeElapsed < maxYieldMs && null !== isInputPending) - return isInputPending(continuousOptions); - } - return !0; + return exports.unstable_now() - startTime < frameInterval ? !1 : !0; } function performWorkUntilDeadline() { if (isMessageLoopRunning) { @@ -212,7 +189,6 @@ function performWorkUntilDeadline() { : (isMessageLoopRunning = !1); } } - needsPaint = !1; } var schedulePerformWorkUntilDeadline; if ("function" === typeof localSetImmediate) @@ -259,7 +235,7 @@ exports.unstable_forceFrameRate = function (fps) { ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" ) - : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : frameYieldMs); + : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 10); }; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; @@ -288,13 +264,7 @@ exports.unstable_next = function (eventHandler) { exports.unstable_pauseExecution = function () { isSchedulerPaused = !0; }; -exports.unstable_requestPaint = function () { - enableIsInputPending && - void 0 !== navigator && - void 0 !== navigator.scheduling && - void 0 !== navigator.scheduling.isInputPending && - (needsPaint = !0); -}; +exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { case 1: diff --git a/compiled/facebook-www/Scheduler-prod.modern.js b/compiled/facebook-www/Scheduler-prod.modern.js index 939c97b2a08ea..3e030cf2c705f 100644 --- a/compiled/facebook-www/Scheduler-prod.modern.js +++ b/compiled/facebook-www/Scheduler-prod.modern.js @@ -14,13 +14,7 @@ var dynamicFeatureFlags = require("SchedulerFeatureFlags"), userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout, - enableIsInputPending = dynamicFeatureFlags.enableIsInputPending, - enableIsInputPendingContinuous = - dynamicFeatureFlags.enableIsInputPendingContinuous, - frameYieldMs = dynamicFeatureFlags.frameYieldMs, - continuousYieldMs = dynamicFeatureFlags.continuousYieldMs, - maxYieldMs = dynamicFeatureFlags.maxYieldMs; + lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; function push(heap, node) { var index = heap.length; heap.push(node); @@ -93,14 +87,7 @@ var taskQueue = [], isHostTimeoutScheduled = !1, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, - localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, - isInputPending = - "undefined" !== typeof navigator && - void 0 !== navigator.scheduling && - void 0 !== navigator.scheduling.isInputPending - ? navigator.scheduling.isInputPending.bind(navigator.scheduling) - : null, - continuousOptions = { includeContinuous: enableIsInputPendingContinuous }; + localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null; function advanceTimers(currentTime) { for (var timer = peek(timerQueue); null !== timer; ) { if (null === timer.callback) pop(timerQueue); @@ -126,20 +113,10 @@ function handleTimeout(currentTime) { } var isMessageLoopRunning = !1, taskTimeoutID = -1, - frameInterval = frameYieldMs, - startTime = -1, - needsPaint = !1; + frameInterval = 10, + startTime = -1; function shouldYieldToHost() { - var timeElapsed = exports.unstable_now() - startTime; - if (timeElapsed < frameInterval) return !1; - if (enableIsInputPending) { - if (needsPaint) return !0; - if (timeElapsed < continuousYieldMs) { - if (null !== isInputPending) return isInputPending(); - } else if (timeElapsed < maxYieldMs && null !== isInputPending) - return isInputPending(continuousOptions); - } - return !0; + return exports.unstable_now() - startTime < frameInterval ? !1 : !0; } function performWorkUntilDeadline() { if (isMessageLoopRunning) { @@ -212,7 +189,6 @@ function performWorkUntilDeadline() { : (isMessageLoopRunning = !1); } } - needsPaint = !1; } var schedulePerformWorkUntilDeadline; if ("function" === typeof localSetImmediate) @@ -259,7 +235,7 @@ exports.unstable_forceFrameRate = function (fps) { ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" ) - : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : frameYieldMs); + : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 10); }; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; @@ -288,13 +264,7 @@ exports.unstable_next = function (eventHandler) { exports.unstable_pauseExecution = function () { isSchedulerPaused = !0; }; -exports.unstable_requestPaint = function () { - enableIsInputPending && - void 0 !== navigator && - void 0 !== navigator.scheduling && - void 0 !== navigator.scheduling.isInputPending && - (needsPaint = !0); -}; +exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { case 1: diff --git a/compiled/facebook-www/Scheduler-profiling.classic.js b/compiled/facebook-www/Scheduler-profiling.classic.js index 930a407c9454f..f3107d235fc65 100644 --- a/compiled/facebook-www/Scheduler-profiling.classic.js +++ b/compiled/facebook-www/Scheduler-profiling.classic.js @@ -19,13 +19,7 @@ var dynamicFeatureFlags = require("SchedulerFeatureFlags"), enableProfilingFeatureFlag = dynamicFeatureFlags.enableProfiling, userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout, - enableIsInputPending = dynamicFeatureFlags.enableIsInputPending, - enableIsInputPendingContinuous = - dynamicFeatureFlags.enableIsInputPendingContinuous, - frameYieldMs = dynamicFeatureFlags.frameYieldMs, - continuousYieldMs = dynamicFeatureFlags.continuousYieldMs, - maxYieldMs = dynamicFeatureFlags.maxYieldMs; + lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; function push(heap, node) { var index = heap.length; heap.push(node); @@ -138,14 +132,7 @@ var taskQueue = [], isHostTimeoutScheduled = !1, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, - localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, - isInputPending = - "undefined" !== typeof navigator && - void 0 !== navigator.scheduling && - void 0 !== navigator.scheduling.isInputPending - ? navigator.scheduling.isInputPending.bind(navigator.scheduling) - : null, - continuousOptions = { includeContinuous: enableIsInputPendingContinuous }; + localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null; function advanceTimers(currentTime) { for (var timer = peek(timerQueue); null !== timer; ) { if (null === timer.callback) pop(timerQueue); @@ -227,20 +214,10 @@ function workLoop(initialTime) { } var isMessageLoopRunning = !1, taskTimeoutID = -1, - frameInterval = frameYieldMs, - startTime = -1, - needsPaint = !1; + frameInterval = 10, + startTime = -1; function shouldYieldToHost() { - var timeElapsed = exports.unstable_now() - startTime; - if (timeElapsed < frameInterval) return !1; - if (enableIsInputPending) { - if (needsPaint) return !0; - if (timeElapsed < continuousYieldMs) { - if (null !== isInputPending) return isInputPending(); - } else if (timeElapsed < maxYieldMs && null !== isInputPending) - return isInputPending(continuousOptions); - } - return !0; + return exports.unstable_now() - startTime < frameInterval ? !1 : !0; } function performWorkUntilDeadline() { if (isMessageLoopRunning) { @@ -301,7 +278,6 @@ function performWorkUntilDeadline() { : (isMessageLoopRunning = !1); } } - needsPaint = !1; } var schedulePerformWorkUntilDeadline; if ("function" === typeof localSetImmediate) @@ -361,7 +337,7 @@ exports.unstable_forceFrameRate = function (fps) { ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" ) - : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : frameYieldMs); + : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 10); }; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; @@ -390,13 +366,7 @@ exports.unstable_next = function (eventHandler) { exports.unstable_pauseExecution = function () { isSchedulerPaused = !0; }; -exports.unstable_requestPaint = function () { - enableIsInputPending && - void 0 !== navigator && - void 0 !== navigator.scheduling && - void 0 !== navigator.scheduling.isInputPending && - (needsPaint = !0); -}; +exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { case 1: diff --git a/compiled/facebook-www/Scheduler-profiling.modern.js b/compiled/facebook-www/Scheduler-profiling.modern.js index 930a407c9454f..f3107d235fc65 100644 --- a/compiled/facebook-www/Scheduler-profiling.modern.js +++ b/compiled/facebook-www/Scheduler-profiling.modern.js @@ -19,13 +19,7 @@ var dynamicFeatureFlags = require("SchedulerFeatureFlags"), enableProfilingFeatureFlag = dynamicFeatureFlags.enableProfiling, userBlockingPriorityTimeout = dynamicFeatureFlags.userBlockingPriorityTimeout, normalPriorityTimeout = dynamicFeatureFlags.normalPriorityTimeout, - lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout, - enableIsInputPending = dynamicFeatureFlags.enableIsInputPending, - enableIsInputPendingContinuous = - dynamicFeatureFlags.enableIsInputPendingContinuous, - frameYieldMs = dynamicFeatureFlags.frameYieldMs, - continuousYieldMs = dynamicFeatureFlags.continuousYieldMs, - maxYieldMs = dynamicFeatureFlags.maxYieldMs; + lowPriorityTimeout = dynamicFeatureFlags.lowPriorityTimeout; function push(heap, node) { var index = heap.length; heap.push(node); @@ -138,14 +132,7 @@ var taskQueue = [], isHostTimeoutScheduled = !1, localSetTimeout = "function" === typeof setTimeout ? setTimeout : null, localClearTimeout = "function" === typeof clearTimeout ? clearTimeout : null, - localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null, - isInputPending = - "undefined" !== typeof navigator && - void 0 !== navigator.scheduling && - void 0 !== navigator.scheduling.isInputPending - ? navigator.scheduling.isInputPending.bind(navigator.scheduling) - : null, - continuousOptions = { includeContinuous: enableIsInputPendingContinuous }; + localSetImmediate = "undefined" !== typeof setImmediate ? setImmediate : null; function advanceTimers(currentTime) { for (var timer = peek(timerQueue); null !== timer; ) { if (null === timer.callback) pop(timerQueue); @@ -227,20 +214,10 @@ function workLoop(initialTime) { } var isMessageLoopRunning = !1, taskTimeoutID = -1, - frameInterval = frameYieldMs, - startTime = -1, - needsPaint = !1; + frameInterval = 10, + startTime = -1; function shouldYieldToHost() { - var timeElapsed = exports.unstable_now() - startTime; - if (timeElapsed < frameInterval) return !1; - if (enableIsInputPending) { - if (needsPaint) return !0; - if (timeElapsed < continuousYieldMs) { - if (null !== isInputPending) return isInputPending(); - } else if (timeElapsed < maxYieldMs && null !== isInputPending) - return isInputPending(continuousOptions); - } - return !0; + return exports.unstable_now() - startTime < frameInterval ? !1 : !0; } function performWorkUntilDeadline() { if (isMessageLoopRunning) { @@ -301,7 +278,6 @@ function performWorkUntilDeadline() { : (isMessageLoopRunning = !1); } } - needsPaint = !1; } var schedulePerformWorkUntilDeadline; if ("function" === typeof localSetImmediate) @@ -361,7 +337,7 @@ exports.unstable_forceFrameRate = function (fps) { ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported" ) - : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : frameYieldMs); + : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 10); }; exports.unstable_getCurrentPriorityLevel = function () { return currentPriorityLevel; @@ -390,13 +366,7 @@ exports.unstable_next = function (eventHandler) { exports.unstable_pauseExecution = function () { isSchedulerPaused = !0; }; -exports.unstable_requestPaint = function () { - enableIsInputPending && - void 0 !== navigator && - void 0 !== navigator.scheduling && - void 0 !== navigator.scheduling.isInputPending && - (needsPaint = !0); -}; +exports.unstable_requestPaint = function () {}; exports.unstable_runWithPriority = function (priorityLevel, eventHandler) { switch (priorityLevel) { case 1: diff --git a/compiled/facebook-www/SchedulerPostTask-dev.classic.js b/compiled/facebook-www/SchedulerPostTask-dev.classic.js index dfc079b41bc79..0bbb2d88a31f5 100644 --- a/compiled/facebook-www/SchedulerPostTask-dev.classic.js +++ b/compiled/facebook-www/SchedulerPostTask-dev.classic.js @@ -35,8 +35,7 @@ if (__DEV__) { var yieldInterval = 5; var deadline = 0; - var currentPriorityLevel_DEPRECATED = NormalPriority; // `isInputPending` is not available. Since we have no way of knowing if - // there's pending input, always yield at the end of the frame. + var currentPriorityLevel_DEPRECATED = NormalPriority; // Always yield at the end of the frame. function unstable_shouldYield() { return getCurrentTime() >= deadline; diff --git a/compiled/facebook-www/SchedulerPostTask-dev.modern.js b/compiled/facebook-www/SchedulerPostTask-dev.modern.js index dfc079b41bc79..0bbb2d88a31f5 100644 --- a/compiled/facebook-www/SchedulerPostTask-dev.modern.js +++ b/compiled/facebook-www/SchedulerPostTask-dev.modern.js @@ -35,8 +35,7 @@ if (__DEV__) { var yieldInterval = 5; var deadline = 0; - var currentPriorityLevel_DEPRECATED = NormalPriority; // `isInputPending` is not available. Since we have no way of knowing if - // there's pending input, always yield at the end of the frame. + var currentPriorityLevel_DEPRECATED = NormalPriority; // Always yield at the end of the frame. function unstable_shouldYield() { return getCurrentTime() >= deadline;