chore: Move platform-routed CSS property parsing into common#9696
Merged
Conversation
The scalar CSS-transition parsing (the routable-property set, their value
kinds and CSS defaults, and the jsi/folly endpoint parsing) lived in the
Apple layer (REACSSPlatformProps + REACSSPlatformValue). Move it into one
common file, CSS/utils/platform.{h,cpp}, with the platform-specific body
under #if __APPLE__ and no-op stubs elsewhere, so the full routable-property
view is localized in one place and non-Apple platforms get a clear loop-only
path.
The Apple layer keeps only the Obj-C / Core Animation glue (idFromPlatformValue,
makeCSSTimingFunction, caLayerKeyPathForCSSProperty). Behavior is unchanged on
every platform.
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
Moves the scalar CSS-transition parsing out of the Apple layer (
REACSSPlatformProps/REACSSPlatformValue) into a single common file,Common/cpp/reanimated/CSS/utils/platform.{h,cpp}.The full set of natively routable properties (their value kinds, CSS defaults, and the jsi/folly endpoint parsing) now lives in one place. The platform-specific body is guarded by
#if __APPLE__; non-Apple platforms (e.g. Android) get no-op stubs, so every property cleanly falls back to the C++ loop. The Apple layer keeps only what is inherently platform typed: the Obj-C / Core Animation glue (idFromPlatformValue,makeCSSTimingFunction,caLayerKeyPathForCSSProperty).Purpose
Groundwork for unifying the platform-routing trigger. Localizing the routable-property view in shared code (rather than per platform) keeps parsing in one auditable place and gives future platforms a single, obvious extension point. No behavior change on any platform.