$ the-wire · showcase
Flutter fixes semantics geometry, UTF-16 deletion, iOS keyboard accents
By RepoJournal · Filed · About Mobile platforms
Flutter landed three correctness fixes across accessibility, text editing, and iOS keyboard input.
Flutter fixed three text and accessibility bugs. When a dialog closes after the page moved while hidden, the screen reader now gets the updated geometry. Previously, the framework dropped the queued geometry update because the node was not in the semantics tree, so it kept using the old position [1]. Text editing also handles deletion correctly: `DeleteSurrounding(offset, count)` now walks UTF-16 units properly, advancing by two when stepping over a lead surrogate. Before, it deleted the wrong code points when a text field contained emoji or other characters outside the Basic Multilingual Plane [2]. On iOS, `TextField` now supports typing accented words with an external keyboard, fixing a long-standing issue [3].
Flutter also continued its type-safe CLI argument refactor, introducing `EnumOptionDescriptor` and `DefaultedEnumOptionDescriptor`, and migrating existing Web and Common options to use them [4]. Swift's compiler received a fix in `IRGen` that makes the frontend command fail when the LLVM backend reports an error. Previously, an error during MC object emission left an empty or partial object file while the frontend returned success, so broken builds could silently produce bad artifacts [5]. In C++ interop, `@cxx @implementation` functions now emit their bodies under the matched C++ mangled symbol and are marked as having foreign references, so C++ callers can link directly and dead-function elimination won't remove them [6].
Kotlin's BTA generator fixed argument restrictions for Wasm and JS. The `restrict()` transformation now correctly applies to synthetic argument levels, so dropped compiler arguments are no longer present in the public BTA, and klib compilation and linking no longer silently ignore `IR_OUTPUT_DIR` and `X_INCLUDE` [7]. The Kotlin DFA analysis moved all variable storage into Flow, eliminating the need for snapshots of `VariableStorage` and ensuring variable information persists across DFA state changes [8]. The ClangImporter no longer conflates anonymous enum cases that share constant names but have different underlying types, which had caused regressions depending on import ordering [9].
Action items
- → Monitor upcoming Flutter releases for these fixes; consider cherry-picking on your current channel if affected. flutter/flutter [plan]
- → Review any builds that may have produced partial object files; update Swift toolchain once this IRGen fix lands. apple/swift [plan]
- → If you use Wasm/JS klib compilation with BTA, verify that IR_OUTPUT_DIR and X_INCLUDE are now respected after upgrade. JetBrains/kotlin [monitor]
References
- [1] Defer semantics geometry updates for blocked branches (#192146) ↗ flutter/flutter
- [2] Fix DeleteSurrounding splitting UTF-16 surrogate pairs (#190514) ↗ flutter/flutter
- [3] [iOS] TextField should support typing accented words with external keyboard (#191062) ↗ flutter/flutter
- [4] [flutter_tools] add typed enum and defaulted option descriptors (#191760) ↗ flutter/flutter
- [5] [IRGen] Fail the frontend command when the LLVM backend reports an error ↗ apple/swift
- [6] [cxx-interop] Lower @cxx @implementation functions to their C++ entry points ↗ apple/swift
- [7] [BTA] Fix argument restrictions for Wasm/JS. ↗ JetBrains/kotlin
- [8] [DFA] Move all variable storage to Flow ↗ JetBrains/kotlin
- [9] [ClangImporter] Don’t conflate cases with different underlying types ↗ apple/swift