Skip to content

Commit b34287d

Browse files
committed
Land enableCustomElementPropertySupport for React 19 (#27450)
We've rolled out this flag internally on WWW. This PR removed flag `enableCustomElementPropertySupport` Test plan: -- `yarn test` Co-authored-by: Ricky Hanlon <[email protected]> DiffTrain build for [eb510a3](eb510a3)
1 parent 9f9e660 commit b34287d

8 files changed

+111
-194
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a73c3450e1b528fa6cb3e94fa4d4359c7a4b61f1
1+
eb510a33048fabd95d272b1c0b65f941e2909240

compiled/facebook-www/ReactDOM-dev.classic.js

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3253,26 +3253,22 @@ if (__DEV__) {
32533253
// it would be expected that they end up not having an attribute.
32543254
return expected;
32553255

3256-
case "function": {
3256+
case "function":
32573257
return expected;
3258-
}
32593258

3260-
case "boolean": {
3259+
case "boolean":
32613260
if (expected === false) {
32623261
return expected;
32633262
}
3264-
}
32653263
}
32663264

32673265
return expected === undefined ? undefined : null;
32683266
}
32693267

32703268
var value = node.getAttribute(name);
32713269

3272-
{
3273-
if (value === "" && expected === true) {
3274-
return true;
3275-
}
3270+
if (value === "" && expected === true) {
3271+
return true;
32763272
}
32773273

32783274
{
@@ -7105,9 +7101,8 @@ if (__DEV__) {
71057101

71067102
case "innerText": // Properties
71077103

7108-
case "textContent": {
7104+
case "textContent":
71097105
return true;
7110-
}
71117106
}
71127107

71137108
switch (typeof value) {
@@ -36348,7 +36343,7 @@ if (__DEV__) {
3634836343
return root;
3634936344
}
3635036345

36351-
var ReactVersion = "19.0.0-www-classic-ad0567f0";
36346+
var ReactVersion = "19.0.0-www-classic-999c716e";
3635236347

3635336348
function createPortal$1(
3635436349
children,
@@ -41723,10 +41718,8 @@ if (__DEV__) {
4172341718
}
4172441719

4172541720
case "innerText":
41726-
case "textContent": {
41721+
case "textContent":
4172741722
break;
41728-
}
41729-
4173041723
// Fall through
4173141724

4173241725
default: {
@@ -41855,10 +41848,8 @@ if (__DEV__) {
4185541848

4185641849
case "innerText": // Properties
4185741850

41858-
case "textContent": {
41851+
case "textContent":
4185941852
break;
41860-
}
41861-
4186241853
// Fall through
4186341854

4186441855
default: {
@@ -41867,9 +41858,7 @@ if (__DEV__) {
4186741858
warnForInvalidEventListener(key, value);
4186841859
}
4186941860
} else {
41870-
{
41871-
setValueForPropertyOnCustomComponent(domElement, key, value);
41872-
}
41861+
setValueForPropertyOnCustomComponent(domElement, key, value);
4187341862
}
4187441863
}
4187541864
}
@@ -43365,7 +43354,7 @@ if (__DEV__) {
4336543354
case "offsetHeight":
4336643355
case "isContentEditable":
4336743356
case "outerText":
43368-
case "outerHTML": {
43357+
case "outerHTML":
4336943358
extraAttributes.delete(propKey.toLowerCase());
4337043359

4337143360
{
@@ -43376,11 +43365,9 @@ if (__DEV__) {
4337643365
}
4337743366

4337843367
continue;
43379-
}
43380-
4338143368
// Fall through
4338243369

43383-
case "className": {
43370+
case "className":
4338443371
// className is a special cased property on the server to render as an attribute.
4338543372
extraAttributes.delete("class");
4338643373
var serverValue = getValueForAttributeOnCustomComponent(
@@ -43395,9 +43382,6 @@ if (__DEV__) {
4339543382
serverDifferences
4339643383
);
4339743384
continue;
43398-
}
43399-
43400-
// Fall through
4340143385

4340243386
default: {
4340343387
// This is a DEV-only path
@@ -43414,15 +43398,14 @@ if (__DEV__) {
4341443398
extraAttributes.delete(propKey);
4341543399
}
4341643400

43417-
var _serverValue = getValueForAttributeOnCustomComponent(
43401+
var valueOnCustomComponent = getValueForAttributeOnCustomComponent(
4341843402
domElement,
4341943403
propKey,
4342043404
value
4342143405
);
43422-
4342343406
warnForPropDifference(
4342443407
propKey,
43425-
_serverValue,
43408+
valueOnCustomComponent,
4342643409
value,
4342743410
serverDifferences
4342843411
);
@@ -43554,10 +43537,10 @@ if (__DEV__) {
4355443537

4355543538
case "muted": {
4355643539
extraAttributes.delete(propKey);
43557-
var _serverValue2 = domElement.muted;
43540+
var _serverValue = domElement.muted;
4355843541
warnForPropDifference(
4355943542
propKey,
43560-
_serverValue2,
43543+
_serverValue,
4356143544
value,
4356243545
serverDifferences
4356343546
);
@@ -43566,10 +43549,10 @@ if (__DEV__) {
4356643549

4356743550
case "autoFocus": {
4356843551
extraAttributes.delete("autofocus");
43569-
var _serverValue3 = domElement.autofocus;
43552+
var _serverValue2 = domElement.autofocus;
4357043553
warnForPropDifference(
4357143554
propKey,
43572-
_serverValue3,
43555+
_serverValue2,
4357343556
value,
4357443557
serverDifferences
4357543558
);
@@ -43628,7 +43611,7 @@ if (__DEV__) {
4362843611

4362943612
case "action":
4363043613
case "formAction": {
43631-
var _serverValue4 = domElement.getAttribute(propKey);
43614+
var _serverValue3 = domElement.getAttribute(propKey);
4363243615

4363343616
if (typeof value === "function") {
4363443617
extraAttributes.delete(propKey.toLowerCase()); // The server can set these extra properties to implement actions.
@@ -43651,7 +43634,7 @@ if (__DEV__) {
4365143634
// have to have the extra extension that doesn't do anything on the client.
4365243635

4365343636
continue;
43654-
} else if (_serverValue4 === EXPECTED_FORM_ACTION_URL) {
43637+
} else if (_serverValue3 === EXPECTED_FORM_ACTION_URL) {
4365543638
extraAttributes.delete(propKey.toLowerCase());
4365643639
warnForPropDifference(
4365743640
propKey,
@@ -43994,7 +43977,7 @@ if (__DEV__) {
4399443977
extraAttributes.delete(attributeName);
4399543978
}
4399643979

43997-
var _serverValue5 = getValueForAttribute(
43980+
var _serverValue4 = getValueForAttribute(
4399843981
domElement,
4399943982
attributeName,
4400043983
value
@@ -44003,7 +43986,7 @@ if (__DEV__) {
4400343986
if (!isMismatchDueToBadCasing) {
4400443987
warnForPropDifference(
4400543988
propKey,
44006-
_serverValue5,
43989+
_serverValue4,
4400743990
value,
4400843991
serverDifferences
4400943992
);

compiled/facebook-www/ReactDOM-dev.modern.js

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2855,26 +2855,22 @@ if (__DEV__) {
28552855
// it would be expected that they end up not having an attribute.
28562856
return expected;
28572857

2858-
case "function": {
2858+
case "function":
28592859
return expected;
2860-
}
28612860

2862-
case "boolean": {
2861+
case "boolean":
28632862
if (expected === false) {
28642863
return expected;
28652864
}
2866-
}
28672865
}
28682866

28692867
return expected === undefined ? undefined : null;
28702868
}
28712869

28722870
var value = node.getAttribute(name);
28732871

2874-
{
2875-
if (value === "" && expected === true) {
2876-
return true;
2877-
}
2872+
if (value === "" && expected === true) {
2873+
return true;
28782874
}
28792875

28802876
{
@@ -6940,9 +6936,8 @@ if (__DEV__) {
69406936

69416937
case "innerText": // Properties
69426938

6943-
case "textContent": {
6939+
case "textContent":
69446940
return true;
6945-
}
69466941
}
69476942

69486943
switch (typeof value) {
@@ -36196,7 +36191,7 @@ if (__DEV__) {
3619636191
return root;
3619736192
}
3619836193

36199-
var ReactVersion = "19.0.0-www-modern-42ab691f";
36194+
var ReactVersion = "19.0.0-www-modern-dccac838";
3620036195

3620136196
function createPortal$1(
3620236197
children,
@@ -42449,10 +42444,8 @@ if (__DEV__) {
4244942444
}
4245042445

4245142446
case "innerText":
42452-
case "textContent": {
42447+
case "textContent":
4245342448
break;
42454-
}
42455-
4245642449
// Fall through
4245742450

4245842451
default: {
@@ -42581,10 +42574,8 @@ if (__DEV__) {
4258142574

4258242575
case "innerText": // Properties
4258342576

42584-
case "textContent": {
42577+
case "textContent":
4258542578
break;
42586-
}
42587-
4258842579
// Fall through
4258942580

4259042581
default: {
@@ -42593,9 +42584,7 @@ if (__DEV__) {
4259342584
warnForInvalidEventListener(key, value);
4259442585
}
4259542586
} else {
42596-
{
42597-
setValueForPropertyOnCustomComponent(domElement, key, value);
42598-
}
42587+
setValueForPropertyOnCustomComponent(domElement, key, value);
4259942588
}
4260042589
}
4260142590
}
@@ -44088,7 +44077,7 @@ if (__DEV__) {
4408844077
case "offsetHeight":
4408944078
case "isContentEditable":
4409044079
case "outerText":
44091-
case "outerHTML": {
44080+
case "outerHTML":
4409244081
extraAttributes.delete(propKey.toLowerCase());
4409344082

4409444083
{
@@ -44099,11 +44088,9 @@ if (__DEV__) {
4409944088
}
4410044089

4410144090
continue;
44102-
}
44103-
4410444091
// Fall through
4410544092

44106-
case "className": {
44093+
case "className":
4410744094
// className is a special cased property on the server to render as an attribute.
4410844095
extraAttributes.delete("class");
4410944096
var serverValue = getValueForAttributeOnCustomComponent(
@@ -44118,9 +44105,6 @@ if (__DEV__) {
4411844105
serverDifferences
4411944106
);
4412044107
continue;
44121-
}
44122-
44123-
// Fall through
4412444108

4412544109
default: {
4412644110
// This is a DEV-only path
@@ -44137,15 +44121,14 @@ if (__DEV__) {
4413744121
extraAttributes.delete(propKey);
4413844122
}
4413944123

44140-
var _serverValue = getValueForAttributeOnCustomComponent(
44124+
var valueOnCustomComponent = getValueForAttributeOnCustomComponent(
4414144125
domElement,
4414244126
propKey,
4414344127
value
4414444128
);
44145-
4414644129
warnForPropDifference(
4414744130
propKey,
44148-
_serverValue,
44131+
valueOnCustomComponent,
4414944132
value,
4415044133
serverDifferences
4415144134
);
@@ -44277,10 +44260,10 @@ if (__DEV__) {
4427744260

4427844261
case "muted": {
4427944262
extraAttributes.delete(propKey);
44280-
var _serverValue2 = domElement.muted;
44263+
var _serverValue = domElement.muted;
4428144264
warnForPropDifference(
4428244265
propKey,
44283-
_serverValue2,
44266+
_serverValue,
4428444267
value,
4428544268
serverDifferences
4428644269
);
@@ -44289,10 +44272,10 @@ if (__DEV__) {
4428944272

4429044273
case "autoFocus": {
4429144274
extraAttributes.delete("autofocus");
44292-
var _serverValue3 = domElement.autofocus;
44275+
var _serverValue2 = domElement.autofocus;
4429344276
warnForPropDifference(
4429444277
propKey,
44295-
_serverValue3,
44278+
_serverValue2,
4429644279
value,
4429744280
serverDifferences
4429844281
);
@@ -44351,7 +44334,7 @@ if (__DEV__) {
4435144334

4435244335
case "action":
4435344336
case "formAction": {
44354-
var _serverValue4 = domElement.getAttribute(propKey);
44337+
var _serverValue3 = domElement.getAttribute(propKey);
4435544338

4435644339
if (typeof value === "function") {
4435744340
extraAttributes.delete(propKey.toLowerCase()); // The server can set these extra properties to implement actions.
@@ -44374,7 +44357,7 @@ if (__DEV__) {
4437444357
// have to have the extra extension that doesn't do anything on the client.
4437544358

4437644359
continue;
44377-
} else if (_serverValue4 === EXPECTED_FORM_ACTION_URL) {
44360+
} else if (_serverValue3 === EXPECTED_FORM_ACTION_URL) {
4437844361
extraAttributes.delete(propKey.toLowerCase());
4437944362
warnForPropDifference(
4438044363
propKey,
@@ -44717,7 +44700,7 @@ if (__DEV__) {
4471744700
extraAttributes.delete(attributeName);
4471844701
}
4471944702

44720-
var _serverValue5 = getValueForAttribute(
44703+
var _serverValue4 = getValueForAttribute(
4472144704
domElement,
4472244705
attributeName,
4472344706
value
@@ -44726,7 +44709,7 @@ if (__DEV__) {
4472644709
if (!isMismatchDueToBadCasing) {
4472744710
warnForPropDifference(
4472844711
propKey,
44729-
_serverValue5,
44712+
_serverValue4,
4473044713
value,
4473144714
serverDifferences
4473244715
);

0 commit comments

Comments
 (0)