Skip to content

chore: Move platform-routed CSS property parsing into common#9696

Merged
MatiPl01 merged 1 commit into
mainfrom
@matipl01/css-platform-parsing-common
Jun 19, 2026
Merged

chore: Move platform-routed CSS property parsing into common#9696
MatiPl01 merged 1 commit into
mainfrom
@matipl01/css-platform-parsing-common

Conversation

@MatiPl01

@MatiPl01 MatiPl01 commented Jun 18, 2026

Copy link
Copy Markdown
Member

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.

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.

@wisniewskij wisniewskij left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MatiPl01
MatiPl01 added this pull request to the merge queue Jun 19, 2026
Merged via the queue into main with commit f262056 Jun 19, 2026
13 checks passed
@MatiPl01
MatiPl01 deleted the @matipl01/css-platform-parsing-common branch June 19, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants