Skip to content

Commit 5e0dfb9

Browse files
committed
Revert to last successful www sync
1 parent fc07b07 commit 5e0dfb9

33 files changed

+723
-1790
lines changed

packages/react-reconciler/src/ReactChildFiber.new.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ import type {Fiber} from './ReactInternalTypes';
1313
import type {Lanes} from './ReactFiberLane.new';
1414

1515
import getComponentName from 'shared/getComponentName';
16-
import {
17-
Deletion,
18-
ChildDeletion,
19-
Placement,
20-
StaticMask,
21-
} from './ReactFiberFlags';
16+
import {Deletion, ChildDeletion, Placement} from './ReactFiberFlags';
2217
import {
2318
getIteratorFn,
2419
REACT_ELEMENT_TYPE,
@@ -280,7 +275,7 @@ function ChildReconciler(shouldTrackSideEffects) {
280275
returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
281276
}
282277
childToDelete.nextEffect = null;
283-
childToDelete.flags = (childToDelete.flags & StaticMask) | Deletion;
278+
childToDelete.flags = Deletion;
284279

285280
let deletions = returnFiber.deletions;
286281
if (deletions === null) {

packages/react-reconciler/src/ReactChildFiber.old.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ import type {Fiber} from './ReactInternalTypes';
1313
import type {Lanes} from './ReactFiberLane.old';
1414

1515
import getComponentName from 'shared/getComponentName';
16-
import {
17-
Deletion,
18-
ChildDeletion,
19-
Placement,
20-
StaticMask,
21-
} from './ReactFiberFlags';
16+
import {Deletion, ChildDeletion, Placement} from './ReactFiberFlags';
2217
import {
2318
getIteratorFn,
2419
REACT_ELEMENT_TYPE,
@@ -280,7 +275,7 @@ function ChildReconciler(shouldTrackSideEffects) {
280275
returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
281276
}
282277
childToDelete.nextEffect = null;
283-
childToDelete.flags = (childToDelete.flags & StaticMask) | Deletion;
278+
childToDelete.flags = Deletion;
284279

285280
let deletions = returnFiber.deletions;
286281
if (deletions === null) {

packages/react-reconciler/src/ReactFiber.new.js

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
enableProfilerTimer,
2828
enableFundamentalAPI,
2929
enableScopeAPI,
30-
enableCache,
3130
} from 'shared/ReactFeatureFlags';
3231
import {NoFlags, Placement, StaticMask} from './ReactFiberFlags';
3332
import {ConcurrentRoot, BlockingRoot} from './ReactRootTags';
@@ -55,7 +54,6 @@ import {
5554
ScopeComponent,
5655
OffscreenComponent,
5756
LegacyHiddenComponent,
58-
CacheComponent,
5957
} from './ReactWorkTags';
6058
import getComponentName from 'shared/getComponentName';
6159

@@ -90,7 +88,6 @@ import {
9088
REACT_SCOPE_TYPE,
9189
REACT_OFFSCREEN_TYPE,
9290
REACT_LEGACY_HIDDEN_TYPE,
93-
REACT_CACHE_TYPE,
9491
} from 'shared/ReactSymbols';
9592

9693
export type {Fiber};
@@ -366,9 +363,9 @@ export function resetWorkInProgress(workInProgress: Fiber, renderLanes: Lanes) {
366363
// We assume pendingProps, index, key, ref, return are still untouched to
367364
// avoid doing another reconciliation.
368365

369-
// Reset the effect flags but keep any Placement tags, since that's something
366+
// Reset the effect tag but keep any Placement tags, since that's something
370367
// that child fiber is setting, not the reconciliation.
371-
workInProgress.flags &= StaticMask | Placement;
368+
workInProgress.flags &= Placement;
372369

373370
// The effect list is no longer valid.
374371
workInProgress.nextEffect = null;
@@ -504,11 +501,6 @@ export function createFiberFromTypeAndProps(
504501
return createFiberFromScope(type, pendingProps, mode, lanes, key);
505502
}
506503
// eslint-disable-next-line no-fallthrough
507-
case REACT_CACHE_TYPE:
508-
if (enableCache) {
509-
return createFiberFromCache(pendingProps, mode, lanes, key);
510-
}
511-
// eslint-disable-next-line no-fallthrough
512504
default: {
513505
if (typeof type === 'object' && type !== null) {
514506
switch (type.$$typeof) {
@@ -753,24 +745,6 @@ export function createFiberFromLegacyHidden(
753745
return fiber;
754746
}
755747

756-
export function createFiberFromCache(
757-
pendingProps: any,
758-
mode: TypeOfMode,
759-
lanes: Lanes,
760-
key: null | string,
761-
) {
762-
const fiber = createFiber(CacheComponent, pendingProps, key, mode);
763-
// TODO: The Cache fiber shouldn't have a type. It has a tag.
764-
// This needs to be fixed in getComponentName so that it relies on the tag
765-
// instead.
766-
if (__DEV__) {
767-
fiber.type = REACT_CACHE_TYPE;
768-
}
769-
fiber.elementType = REACT_CACHE_TYPE;
770-
fiber.lanes = lanes;
771-
return fiber;
772-
}
773-
774748
export function createFiberFromText(
775749
content: string,
776750
mode: TypeOfMode,

packages/react-reconciler/src/ReactFiber.old.js

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import {
2727
enableProfilerTimer,
2828
enableFundamentalAPI,
2929
enableScopeAPI,
30-
enableCache,
3130
} from 'shared/ReactFeatureFlags';
3231
import {NoFlags, Placement, StaticMask} from './ReactFiberFlags';
3332
import {ConcurrentRoot, BlockingRoot} from './ReactRootTags';
@@ -55,7 +54,6 @@ import {
5554
ScopeComponent,
5655
OffscreenComponent,
5756
LegacyHiddenComponent,
58-
CacheComponent,
5957
} from './ReactWorkTags';
6058
import getComponentName from 'shared/getComponentName';
6159

@@ -90,7 +88,6 @@ import {
9088
REACT_SCOPE_TYPE,
9189
REACT_OFFSCREEN_TYPE,
9290
REACT_LEGACY_HIDDEN_TYPE,
93-
REACT_CACHE_TYPE,
9491
} from 'shared/ReactSymbols';
9592

9693
export type {Fiber};
@@ -366,9 +363,9 @@ export function resetWorkInProgress(workInProgress: Fiber, renderLanes: Lanes) {
366363
// We assume pendingProps, index, key, ref, return are still untouched to
367364
// avoid doing another reconciliation.
368365

369-
// Reset the effect flags but keep any Placement tags, since that's something
366+
// Reset the effect tag but keep any Placement tags, since that's something
370367
// that child fiber is setting, not the reconciliation.
371-
workInProgress.flags &= StaticMask | Placement;
368+
workInProgress.flags &= Placement;
372369

373370
// The effect list is no longer valid.
374371
workInProgress.nextEffect = null;
@@ -504,11 +501,6 @@ export function createFiberFromTypeAndProps(
504501
return createFiberFromScope(type, pendingProps, mode, lanes, key);
505502
}
506503
// eslint-disable-next-line no-fallthrough
507-
case REACT_CACHE_TYPE:
508-
if (enableCache) {
509-
return createFiberFromCache(pendingProps, mode, lanes, key);
510-
}
511-
// eslint-disable-next-line no-fallthrough
512504
default: {
513505
if (typeof type === 'object' && type !== null) {
514506
switch (type.$$typeof) {
@@ -753,24 +745,6 @@ export function createFiberFromLegacyHidden(
753745
return fiber;
754746
}
755747

756-
export function createFiberFromCache(
757-
pendingProps: any,
758-
mode: TypeOfMode,
759-
lanes: Lanes,
760-
key: null | string,
761-
) {
762-
const fiber = createFiber(CacheComponent, pendingProps, key, mode);
763-
// TODO: The Cache fiber shouldn't have a type. It has a tag.
764-
// This needs to be fixed in getComponentName so that it relies on the tag
765-
// instead.
766-
if (__DEV__) {
767-
fiber.type = REACT_CACHE_TYPE;
768-
}
769-
fiber.elementType = REACT_CACHE_TYPE;
770-
fiber.lanes = lanes;
771-
return fiber;
772-
}
773-
774748
export function createFiberFromText(
775749
content: string,
776750
mode: TypeOfMode,

0 commit comments

Comments
 (0)