|
7 | 7 | * @flow
|
8 | 8 | */
|
9 | 9 |
|
| 10 | +import{enableCreateEventHandleAPI}from'shared/ReactFeatureFlags'; |
| 11 | + |
10 | 12 | exporttypeFlags=number;
|
11 | 13 |
|
12 | 14 | // Don't change these two values. They're used by React Dev Tools.
|
13 |
| -exportconstNoFlags=/* */0b000000000000000000; |
14 |
| -exportconstPerformedWork=/* */0b000000000000000001; |
| 15 | +exportconstNoFlags=/* */0b0000000000000000000; |
| 16 | +exportconstPerformedWork=/* */0b0000000000000000001; |
15 | 17 |
|
16 | 18 | // You can change the rest (and add more).
|
17 |
| -exportconstPlacement=/* */0b000000000000000010; |
18 |
| -exportconstUpdate=/* */0b000000000000000100; |
19 |
| -exportconstPlacementAndUpdate=/* */0b000000000000000110; |
20 |
| -exportconstDeletion=/* */0b000000000000001000; |
21 |
| -exportconstContentReset=/* */0b000000000000010000; |
22 |
| -exportconstCallback=/* */0b000000000000100000; |
23 |
| -exportconstDidCapture=/* */0b000000000001000000; |
24 |
| -exportconstRef=/* */0b000000000010000000; |
25 |
| -exportconstSnapshot=/* */0b000000000100000000; |
26 |
| -exportconstPassive=/* */0b000000001000000000; |
27 |
| -// TODO (effects) Remove this bit once the new reconciler is synced to the old. |
28 |
| -exportconstPassiveUnmountPendingDev=/* */0b000010000000000000; |
29 |
| -exportconstHydrating=/* */0b000000010000000000; |
30 |
| -exportconstHydratingAndUpdate=/* */0b000000010000000100; |
| 19 | +exportconstPlacement=/* */0b0000000000000000010; |
| 20 | +exportconstUpdate=/* */0b0000000000000000100; |
| 21 | +exportconstPlacementAndUpdate=/* */0b0000000000000000110; |
| 22 | +exportconstDeletion=/* */0b0000000000000001000; |
| 23 | +exportconstContentReset=/* */0b0000000000000010000; |
| 24 | +exportconstCallback=/* */0b0000000000000100000; |
| 25 | +exportconstDidCapture=/* */0b0000000000001000000; |
| 26 | +exportconstRef=/* */0b0000000000010000000; |
| 27 | +exportconstSnapshot=/* */0b0000000000100000000; |
| 28 | +exportconstPassive=/* */0b0000000001000000000; |
| 29 | +exportconstHydrating=/* */0b0000000010000000000; |
| 30 | +exportconstHydratingAndUpdate=/* */0b0000000010000000100; |
| 31 | +exportconstVisibility=/* */0b0000000100000000000; |
31 | 32 |
|
32 | 33 | // Passive & Update & Callback & Ref & Snapshot
|
33 |
| -exportconstLifecycleEffectMask=/* */0b000000001110100100; |
| 34 | +exportconstLifecycleEffectMask=/* */0b0000000001110100100; |
34 | 35 |
|
35 | 36 | // Union of all host effects
|
36 |
| -exportconstHostEffectMask=/* */0b000000011111111111; |
| 37 | +exportconstHostEffectMask=/* */0b0000000111111111111; |
37 | 38 |
|
38 | 39 | // These are not really side effects, but we still reuse this field.
|
39 |
| -exportconstIncomplete=/* */0b000000100000000000; |
40 |
| -exportconstShouldCapture=/* */0b000001000000000000; |
41 |
| -exportconstForceUpdateForLegacySuspense=/* */0b000100000000000000; |
| 40 | +exportconstIncomplete=/* */0b0000001000000000000; |
| 41 | +exportconstShouldCapture=/* */0b0000010000000000000; |
| 42 | +// TODO (effects) Remove this bit once the new reconciler is synced to the old. |
| 43 | +exportconstPassiveUnmountPendingDev=/* */0b0000100000000000000; |
| 44 | +exportconstForceUpdateForLegacySuspense=/* */0b0001000000000000000; |
42 | 45 |
|
43 | 46 | // Static tags describe aspects of a fiber that are not specific to a render,
|
44 | 47 | // e.g. a fiber uses a passive effect (even if there are no updates on this particular render).
|
45 | 48 | // This enables us to defer more work in the unmount case,
|
46 | 49 | // since we can defer traversing the tree during layout to look for Passive effects,
|
47 | 50 | // and instead rely on the static flag as a signal that there may be cleanup work.
|
48 |
| -exportconstPassiveStatic=/* */0b001000000000000000; |
| 51 | +exportconstPassiveStatic=/* */0b0010000000000000000; |
49 | 52 |
|
50 | 53 | // Union of side effect groupings as pertains to subtreeFlags
|
51 |
| -// TODO: Don't need to visit Placement during BeforeMutation phase |
52 |
| -// TODO: Only need to visit Deletions during BeforeMutation phase if an element |
53 |
| -// is focused. |
54 |
| -exportconstBeforeMutationMask=/* */0b000000000100001010; |
55 |
| -exportconstMutationMask=/* */0b000000010010011110; |
56 |
| -exportconstLayoutMask=/* */0b000000000010100100; |
57 |
| -exportconstPassiveMask=/* */0b000000001000001000; |
| 54 | + |
| 55 | +exportconstBeforeMutationMask= |
| 56 | +Snapshot| |
| 57 | +(enableCreateEventHandleAPI |
| 58 | + ? // createEventHandle needs to visit deleted and hidden trees to |
| 59 | +// fire beforeblur |
| 60 | +// TODO: Only need to visit Deletions during BeforeMutation phase if an |
| 61 | +// element is focused. |
| 62 | +Deletion|Visibility |
| 63 | + : 0); |
| 64 | + |
| 65 | +exportconstMutationMask=/* */0b0000000110010011110; |
| 66 | +exportconstLayoutMask=/* */0b0000000000010100100; |
| 67 | +exportconstPassiveMask=/* */0b0000000001000001000; |
58 | 68 |
|
59 | 69 | // Union of tags that don't get reset on clones.
|
60 | 70 | // This allows certain concepts to persist without recalculting them,
|
61 | 71 | // e.g. whether a subtree contains passive effects or portals.
|
62 |
| -exportconstStaticMask=/* */0b001000000000000000; |
| 72 | +exportconstStaticMask=/* */0b0010000000000000000; |
63 | 73 |
|
64 | 74 | // These flags allow us to traverse to fibers that have effects on mount
|
65 | 75 | // without traversing the entire tree after every commit for
|
66 | 76 | // double invoking
|
67 |
| -exportconstMountLayoutDev=/* */0b010000000000000000; |
68 |
| -exportconstMountPassiveDev=/* */0b100000000000000000; |
| 77 | +exportconstMountLayoutDev=/* */0b0100000000000000000; |
| 78 | +exportconstMountPassiveDev=/* */0b1000000000000000000; |
0 commit comments