Skip to content

Make retained inset parsing portable on macOS - #306

Merged
wieslawsoltes merged 1 commit into
mainfrom
fix/inset-number-portability-302
Sep 17, 2026
Merged

wieslawsoltes merged 1 commit into
mainfrom
fix/inset-number-portability-302

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Collaborator

Problem

The retained inset clip parser uses floating-point std::from_chars. Apple libc++ only exposes that overload on newer macOS deployment targets, so the current WebScene package fails to compile for the supported macOS target.

Change

  • add a locale-independent CSS ASCII-number prefix parser for retained inset lengths
  • preserve the accepted px, %, unitless-zero, sign, decimal, and exponent forms
  • reject partial, non-finite, overflowed, unsupported-unit, trailing-whitespace, and embedded-NUL values
  • use the portable parser in retained inset clip resolution
  • build the focused parser contract in every native configuration

Validation

  • AppleClang build with CMAKE_OSX_DEPLOYMENT_TARGET=12.0 and V8 disabled
  • full V8-free CTest: 21/21 passed
  • focused CSS number and HTML parser contracts passed
  • 100,000 parses: about 1.10 ms against a 500 ms budget
  • git diff --check

This PR addresses the macOS package compile failure only. Linux CSS timing failures remain tracked in #238, and the independent Windows IndexedDB literal failure remains tracked in #301.

Closes #302

@wieslawsoltes
wieslawsoltes force-pushed the fix/inset-number-portability-302 branch from 9131e5c to 6582b22 Compare September 17, 2026 18:24
@wieslawsoltes
wieslawsoltes merged commit 2643150 into main Sep 17, 2026
0 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make retained inset length parsing portable below macOS 26

1 participant