Skip to content

Commit

Permalink
React DOM: Support boolean values for inert prop (#24730)
Browse files Browse the repository at this point in the history
DiffTrain build for [bbc571a](bbc571a)
  • Loading branch information
eps1lon committed Mar 13, 2024
1 parent 8e12d48 commit b18936e
Show file tree
Hide file tree
Showing 19 changed files with 164 additions and 43 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17eaacaac167addf0c4358b4983f054073a0626d
bbc571aee431d44799ae6a70832ea834325a5af9
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,4 +633,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-7c2abefb";
exports.version = "18.3.0-www-classic-3035b16e";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,4 +625,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-modern-0337b6c3";
exports.version = "18.3.0-www-modern-0c35550e";
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-www-classic-9048e373";
exports.version = "18.3.0-www-classic-bf936cd0";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if (__DEV__) {
return self;
}

var ReactVersion = "18.3.0-www-modern-0c307366";
var ReactVersion = "18.3.0-www-modern-6a870747";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
24 changes: 21 additions & 3 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -6218,9 +6218,9 @@ if (__DEV__) {
return aliases.get(name) || name;
}

// When adding attributes to the HTML or SVG allowed attribute list, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.

var possibleStandardNames = {
// HTML
accept: "accept",
Expand Down Expand Up @@ -7153,6 +7153,10 @@ if (__DEV__) {
// Boolean properties can accept boolean values
return true;
}
// fallthrough

case "inert":
// fallthrough for new boolean props without the flag on

default: {
var prefix = name.toLowerCase().slice(0, 5);
Expand Down Expand Up @@ -7235,6 +7239,9 @@ if (__DEV__) {
break;
}

case "inert":
// fallthrough for new boolean props without the flag on

default: {
return true;
}
Expand Down Expand Up @@ -35764,7 +35771,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "18.3.0-www-classic-bdc658a4";
var ReactVersion = "18.3.0-www-classic-ecd67585";

function createPortal$1(
children,
Expand Down Expand Up @@ -40274,14 +40281,14 @@ if (__DEV__) {
var canDiffStyleForHydrationWarning;

{
// IE 11 parses & normalizes the style attribute as opposed to other
// browsers. It adds spaces and sorts the properties in some
// non-alphabetical order. Handling that would require sorting CSS
// properties in the client & server versions or applying
// `expectedStyle` to a temporary DOM node to read its `style` attribute
// normalized. Since it only affects IE, we're skipping style warnings
// in that browser completely in favor of doing all that work.
// See https://github.com/facebook/react/issues/11807

canDiffStyleForHydrationWarning =
disableIEWorkarounds || (canUseDOM && !document.documentMode);
}
Expand Down Expand Up @@ -40944,6 +40951,13 @@ if (__DEV__) {
}
// Boolean

case "inert": {
setValueForAttribute(domElement, key, value);
break;
}

// fallthrough for new boolean props without the flag on

case "allowFullScreen":
case "async":
case "autoPlay":
Expand Down Expand Up @@ -43186,6 +43200,10 @@ if (__DEV__) {
);
continue;

case "inert":

// fallthrough for new boolean props without the flag on

default: {
if (
// shouldIgnoreAttribute
Expand Down
24 changes: 21 additions & 3 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -6052,9 +6052,9 @@ if (__DEV__) {
return aliases.get(name) || name;
}

// When adding attributes to the HTML or SVG allowed attribute list, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.

var possibleStandardNames = {
// HTML
accept: "accept",
Expand Down Expand Up @@ -6987,6 +6987,10 @@ if (__DEV__) {
// Boolean properties can accept boolean values
return true;
}
// fallthrough

case "inert":
// fallthrough for new boolean props without the flag on

default: {
var prefix = name.toLowerCase().slice(0, 5);
Expand Down Expand Up @@ -7069,6 +7073,9 @@ if (__DEV__) {
break;
}

case "inert":
// fallthrough for new boolean props without the flag on

default: {
return true;
}
Expand Down Expand Up @@ -35611,7 +35618,7 @@ if (__DEV__) {
return root;
}

var ReactVersion = "18.3.0-www-modern-36442b85";
var ReactVersion = "18.3.0-www-modern-c4533c51";

function createPortal$1(
children,
Expand Down Expand Up @@ -40930,14 +40937,14 @@ if (__DEV__) {
var canDiffStyleForHydrationWarning;

{
// IE 11 parses & normalizes the style attribute as opposed to other
// browsers. It adds spaces and sorts the properties in some
// non-alphabetical order. Handling that would require sorting CSS
// properties in the client & server versions or applying
// `expectedStyle` to a temporary DOM node to read its `style` attribute
// normalized. Since it only affects IE, we're skipping style warnings
// in that browser completely in favor of doing all that work.
// See https://github.com/facebook/react/issues/11807

canDiffStyleForHydrationWarning =
disableIEWorkarounds || (canUseDOM && !document.documentMode);
}
Expand Down Expand Up @@ -41600,6 +41607,13 @@ if (__DEV__) {
}
// Boolean

case "inert": {
setValueForAttribute(domElement, key, value);
break;
}

// fallthrough for new boolean props without the flag on

case "allowFullScreen":
case "async":
case "autoPlay":
Expand Down Expand Up @@ -43839,6 +43853,10 @@ if (__DEV__) {
);
continue;

case "inert":

// fallthrough for new boolean props without the flag on

default: {
if (
// shouldIgnoreAttribute
Expand Down
9 changes: 6 additions & 3 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -14529,6 +14529,9 @@ function setProp(domElement, tag, key, value, props, prevValue) {
)
: domElement.removeAttribute(key);
break;
case "inert":
setValueForAttribute(domElement, key, value);
break;
case "allowFullScreen":
case "async":
case "autoPlay":
Expand Down Expand Up @@ -17228,7 +17231,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1817 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-36e5e9c2",
version: "18.3.0-www-classic-73e9398a",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2176 = {
Expand Down Expand Up @@ -17258,7 +17261,7 @@ var internals$jscomp$inline_2176 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-36e5e9c2"
reconcilerVersion: "18.3.0-www-classic-73e9398a"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2177 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17589,4 +17592,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-classic-36e5e9c2";
exports.version = "18.3.0-www-classic-73e9398a";
9 changes: 6 additions & 3 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -14833,6 +14833,9 @@ function setProp(domElement, tag, key, value, props, prevValue) {
)
: domElement.removeAttribute(key);
break;
case "inert":
setValueForAttribute(domElement, key, value);
break;
case "allowFullScreen":
case "async":
case "autoPlay":
Expand Down Expand Up @@ -16744,7 +16747,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1776 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-67f26aa2",
version: "18.3.0-www-modern-aea768af",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2140 = {
Expand Down Expand Up @@ -16775,7 +16778,7 @@ var internals$jscomp$inline_2140 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-67f26aa2"
reconcilerVersion: "18.3.0-www-modern-aea768af"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2141 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -17034,4 +17037,4 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-modern-67f26aa2";
exports.version = "18.3.0-www-modern-aea768af";
9 changes: 6 additions & 3 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -15276,6 +15276,9 @@ function setProp(domElement, tag, key, value, props, prevValue) {
)
: domElement.removeAttribute(key);
break;
case "inert":
setValueForAttribute(domElement, key, value);
break;
case "allowFullScreen":
case "async":
case "autoPlay":
Expand Down Expand Up @@ -17975,7 +17978,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1902 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-b1962418",
version: "18.3.0-www-classic-5be4d00a",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -18019,7 +18022,7 @@ var devToolsConfig$jscomp$inline_1902 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-b1962418"
reconcilerVersion: "18.3.0-www-classic-5be4d00a"
});
assign(Internals, {
ReactBrowserEventEmitter: {
Expand Down Expand Up @@ -18337,7 +18340,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-classic-b1962418";
exports.version = "18.3.0-www-classic-5be4d00a";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
9 changes: 6 additions & 3 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -15574,6 +15574,9 @@ function setProp(domElement, tag, key, value, props, prevValue) {
)
: domElement.removeAttribute(key);
break;
case "inert":
setValueForAttribute(domElement, key, value);
break;
case "allowFullScreen":
case "async":
case "autoPlay":
Expand Down Expand Up @@ -17485,7 +17488,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1861 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-0c307366",
version: "18.3.0-www-modern-6a870747",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17530,7 +17533,7 @@ var devToolsConfig$jscomp$inline_1861 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-0c307366"
reconcilerVersion: "18.3.0-www-modern-6a870747"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function (children, container) {
Expand Down Expand Up @@ -17776,7 +17779,7 @@ exports.useFormState = function (action, initialState, permalink) {
exports.useFormStatus = function () {
return ReactCurrentDispatcher$2.current.useHostTransitionStatus();
};
exports.version = "18.3.0-www-modern-0c307366";
exports.version = "18.3.0-www-modern-6a870747";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
16 changes: 13 additions & 3 deletions compiled/facebook-www/ReactDOMServer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "18.3.0-www-classic-665182c7";
var ReactVersion = "18.3.0-www-classic-8476b078";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -1168,9 +1168,9 @@ if (__DEV__) {
}
}

// When adding attributes to the HTML or SVG allowed attribute list, be sure to
// also add them to this module to ensure casing and incorrect name
// warnings.

var possibleStandardNames = {
// HTML
accept: "accept",
Expand Down Expand Up @@ -1906,6 +1906,10 @@ if (__DEV__) {
// Boolean properties can accept boolean values
return true;
}
// fallthrough

case "inert":
// fallthrough for new boolean props without the flag on

default: {
var prefix = name.toLowerCase().slice(0, 5);
Expand Down Expand Up @@ -1988,6 +1992,9 @@ if (__DEV__) {
break;
}

case "inert":
// fallthrough for new boolean props without the flag on

default: {
return true;
}
Expand Down Expand Up @@ -2476,7 +2483,7 @@ if (__DEV__) {
// It should also be noted that this maximum is a soft maximum. we have not reached the limit we will
// allow one more header to be captured which means in practice if the limit is approached it will be exceeded

var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000; // Allows us to keep track of what we've already written so we can refer back to it.
var DEFAULT_HEADERS_CAPACITY_IN_UTF16_CODE_UNITS = 2000;
// if passed externalRuntimeConfig and the enableFizzExternalRuntime feature flag
// is set, the server will send instructions via data attributes (instead of inline scripts)

Expand Down Expand Up @@ -3553,6 +3560,9 @@ if (__DEV__) {
pushStringAttribute(target, "xml:space", value);
return;

case "inert":
// fallthrough for new boolean props without the flag on

default:
if (
// shouldIgnoreAttribute
Expand Down
Loading

0 comments on commit b18936e

Please sign in to comment.