Eliminates the `strip_bitcode` GN rule defined in
//flutter/sky/tools/mac.gni and the related script at
//flutter/sky/tools/strip_bitcode.py.
As of Xcode 14, bitcode is deprecated, no longer enabled by default, and
generates a warning message if a project enables it. Bitcode support
will be removed entirely from a future version of Xcode.
The `strip_bitcode` rule had two purposes:
1. Copy the binary specified by its input parameter to the path
specified by its output parameter.
2. Strip bitcode segments as it does so.
While we no longer require the second of these functions, we still use
the first to create a `gen_snapshot` binary suffixed with the target
architecture. This replaces `strip_bitcode` with the built-in gn `copy`
rule instead.
Issue: https://github.com/flutter/flutter/issues/107884
Issue: https://github.com/flutter/flutter/issues/112896
Issue: https://github.com/flutter/flutter/issues/101138
Issue: https://github.com/flutter/flutter/issues/103386
The gen_snapshots.py tool is used to copy an input gen_snapshot to an
output path with an architecture-specific suffix. For example, to copy
gen_snapshot to gen_snapshot_arm64. Bitcode segments, if any, are
stripped.
This moves the input/output filename hardcoding into the BUILD.gn file
and generalises the logic to simply copy an input binary to an output
path with bitcode segments stripped. Since the tool is no longer
gen_snapshot specific, we rename it from gen_snapshots.py to
strip_bitcode.py.
This also renames the generalised `macos_gen_snapshots` rule to
`strip_bitcode`.
Since we're working on removing bitcode support from the engine, this
script will eventually serve no purpose other than to copy the input
binary to an output path, at which point this script, and the associated
`strip_bitcode` template in `//flutter/sky/tools/macos_tools.gni` can be
removed.
Along with the TODO, renaming the script and the rule help ensure we'll
spot this and remove it when bitcode support is removed from the engine.
Finally, this fixes a dependency issue in the target
//flutter/lib/snapshot:create_macos_gen_snapshots. Previously, it
dependended on ":generate_snapshot_bin", but in fact, the only file it
touches is gen_snapshot. This was built transitively as part of the
":generate_snapshot_bin" target, but is now depended on directly.
This is pre-factoring for merging the iOS and macOS gen_snapshot
creation build rules in `flutter/lib/snapshot/BUILD.gn`.
Issue: https://github.com/flutter/flutter/issues/103386
Issue: https://github.com/flutter/flutter/issues/101138
Issue: https://github.com/flutter/flutter/issues/107884
Cleans up the logic for building gen_snapshot for macOS hosts. Also adds
a bit more documentation to the snapshot-related build targets.
Previously:
* gen_snapshot targeting macOS (on both x64, and arm64) were generated
via the `create_macos_gen_snapshots` target.
* gen_snapshot arm/arm64 builds (on a macOS host) were generated via the
`create_arm_gen_snapshot` target. The reason why this covers only
arm/arm64 is simply that those are the only platforms we generate
iOS/Android AOT builds for. x64 iOS implies a simulator build, but we
only support debug builds for the iOS simulator, which aren't AOT
builds, and thus don't require gen_snapshot.
These two conditions overlap in the case of arm64 (but not x64) target
builds. This separates the two cases cleanly. A later patch will merge
the two cases to use a single tool.
Note that NEITHER of these two scenarios mentions builds for macOS hosts
targeting Fuchsia. That's because this target is never invoked during
Fuchsia target builds. See:
75d2baf5fe/BUILD.gn (L93-L95)
Issue: https://github.com/flutter/flutter/issues/103386
Issue: https://github.com/flutter/flutter/issues/101138
* Fix the a11y scrolling issue
* Add scroll overflow dom element
* Add tests for scrollTop/scrollLeft
* Documentation and code clean-ups
* call recomputePositionAndSize() after neutralizing the scroll position
* Remove unnecessary imports