Name the no-tag sentinel and use it for the hardcoded -1 tags - #58531
Open
janicduplessis wants to merge 1 commit into
Open
janicduplessis wants to merge 1 commit into
janicduplessis wants to merge 1 commit into
Conversation
React tags are positive; -1 marks the absence of one in several places with a bare literal. kNoTag in ReactPrimitives.h gives the convention a name — mirroring NO_SURFACE_ID on the Android side — and replaces the literals across the renderer: ShadowViewMutation's parentTag default, factories and comparison, the stub view tree (folding its duplicate NO_VIEW_TAG constant into kNoTag), the CppMountItem mirrors on Android, UIManagerViewTransitionDelegate's nativeTag and the view transition fallback that feeds it, and the pointer-events no-override comparisons.
janicduplessis
force-pushed
the
safe-area/0-no-tag-sentinel
branch
from
September 15, 2026 15:12
e0a9f6e to
dc454c0
Compare
Contributor
Author
|
@Abbondanzo This is ready for review, first PR of the safe area insets stack. |
|
@Abbondanzo has imported this pull request. If you are a Meta employee, you can view this in D120199347. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
React tags are positive;
-1marks the absence of one in several places with a bare literal. This names the convention —kNoTaginReactPrimitives.h, next to theTagalias and mirroringViewUtil.NO_SURFACE_IDon the Android side — and replaces the literals across the renderer:ShadowViewMutation'sparentTagdefault, factories and comparison, the stub view tree (folding its duplicateNO_VIEW_TAGconstant intokNoTag), theCppMountItemmirrors on Android,UIManagerViewTransitionDelegate'snativeTagand the view transition fallback that feeds it, and the pointer-events no-override comparisons.Split out of the safe area insets stack: #58530 threads a
Tagwith no-tag semantics throughexperimental_flushSyncand wants the named sentinel, but the cleanup stands on its own and can land regardless of that PR's fate.Changelog:
[INTERNAL] - Name the no-tag sentinel (
kNoTag) and use it for the hardcoded-1tagsTest Plan:
Compiles via the Fantom tester build;
yarn fantommounting-heavy suite passes 224/224 (exercises theStubViewTreeasserts). C++ API snapshots regenerated — the only delta is the newkNoTagconstant.