Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual roll Flutter from ead6b0d17c89 to 6bba08cbcc51 (37 revisions) #7809

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
40760d1
180f40108 Roll Packages from f38b780f530f to 0321757447bf (4 revision…
engine-flutter-autoroll Oct 7, 2024
d425afe
dec2091c0 Turn the packages roller bot back on (flutter/flutter#155842)
engine-flutter-autoroll Oct 7, 2024
a554ebc
2dbd73dbb Roll Flutter Engine from 7c603de2dca7 to f21f2b232b8a (6 re…
engine-flutter-autoroll Oct 7, 2024
9585e0d
96291fc0c Fix typo on theme_data (flutter/flutter#155644)
engine-flutter-autoroll Oct 7, 2024
8aee7b6
1290ab42d Add magnificationScale to CupertinoMagnifier for Zoom Effe…
engine-flutter-autoroll Oct 7, 2024
030aee6
3e4a57fa5 Roll Flutter Engine from f21f2b232b8a to f9e4ed28f103 (2 re…
engine-flutter-autoroll Oct 7, 2024
d542930
9928ba8bd Roll Flutter Engine from f9e4ed28f103 to 9c8e5cb226e4 (1 re…
engine-flutter-autoroll Oct 7, 2024
8cb0247
10fe74a15 Roll Flutter Engine from 9c8e5cb226e4 to f3b11bcd9c37 (3 re…
engine-flutter-autoroll Oct 7, 2024
0d19095
71fd800e7 Roll Flutter Engine from f3b11bcd9c37 to 380fd814448c (1 re…
engine-flutter-autoroll Oct 7, 2024
73b382e
9f88de930 Optimize `Overlay` sample to avoid overflow (flutter/flutte…
engine-flutter-autoroll Oct 7, 2024
83c5e18
a9b648f75 Roll Flutter Engine from 380fd814448c to ff4541712df4 (1 re…
engine-flutter-autoroll Oct 7, 2024
370a29b
29dd03c56 Fixes column text width calculation in CupertinoDatePicker …
engine-flutter-autoroll Oct 7, 2024
2b20817
3f3eadbf8 Roll Flutter Engine from ff4541712df4 to c4784aa7eade (2 re…
engine-flutter-autoroll Oct 7, 2024
a12e6e9
4fdfbd4dd Roll Flutter Engine from c4784aa7eade to 569abc4044b8 (2 re…
engine-flutter-autoroll Oct 7, 2024
3c518ec
15f3f992e Roll Flutter Engine from 569abc4044b8 to 897f5caffe2d (1 re…
engine-flutter-autoroll Oct 7, 2024
b73ee7c
10ece6191 Roll Flutter Engine from 897f5caffe2d to 338f09c4ea72 (2 re…
engine-flutter-autoroll Oct 7, 2024
e037c57
c6fdd842a Roll Flutter Engine from 338f09c4ea72 to 734205fbcd62 (1 re…
engine-flutter-autoroll Oct 7, 2024
f2e19b6
e5971fc7c Roll Flutter Engine from 734205fbcd62 to daf126b38b8f (1 re…
engine-flutter-autoroll Oct 7, 2024
b3a2458
e3828ec94 Roll Flutter Engine from daf126b38b8f to f4507e7a4beb (1 re…
engine-flutter-autoroll Oct 7, 2024
e92547b
84f65686d fix: support android 15 16k page size for template plugin_f…
engine-flutter-autoroll Oct 7, 2024
af9f3e5
31d6b35b7 Move FlutterLogo from material to widget (flutter/flutter#1…
engine-flutter-autoroll Oct 7, 2024
47f5c0f
394134672 when `ResidentRunner.tryInitLogReader` fails, only log warn…
engine-flutter-autoroll Oct 7, 2024
56d9160
0bf7b10a3 Roll Flutter Engine from f4507e7a4beb to b466a0dd7834 (1 re…
engine-flutter-autoroll Oct 7, 2024
c9f415a
9441f9d48 Roll Packages from 0321757447bf to 27c98537ccac (3 revision…
engine-flutter-autoroll Oct 7, 2024
fae6e92
350b4753e `RenderParagraph`s `_SelectableFragment.boundingBoxes` shou…
engine-flutter-autoroll Oct 7, 2024
5475310
91fd01bf6 Roll Flutter Engine from b466a0dd7834 to e61bc853acb2 (5 re…
engine-flutter-autoroll Oct 7, 2024
c7e17eb
72edaa3d6 Move platform specific text selection behavior out of style…
engine-flutter-autoroll Oct 7, 2024
c5232e8
bff135153 Fix leak in input_decorator [prod-leak-fix] (flutter/flutte…
engine-flutter-autoroll Oct 7, 2024
e21bc47
cf4dace52 Fix crash in Linux platform channel example. (flutter/flutt…
engine-flutter-autoroll Oct 7, 2024
71c6606
0fb6774d5 Disable flaky menu test (flutter/flutter#155968)
engine-flutter-autoroll Oct 7, 2024
e5e80ca
e6c955416 Roll Flutter Engine from e61bc853acb2 to bfb6dddb2b30 (8 re…
engine-flutter-autoroll Oct 7, 2024
7b3fec6
8027caaf1 Roll Flutter Engine from bfb6dddb2b30 to 6ee04ed763d9 (3 re…
engine-flutter-autoroll Oct 7, 2024
d6f64e2
cf2657d2b Roll Flutter Engine from 6ee04ed763d9 to 259f56c6e91b (1 re…
engine-flutter-autoroll Oct 7, 2024
92480bb
8f514abec Roll Flutter Engine from 259f56c6e91b to 6b21b796cc94 (1 re…
engine-flutter-autoroll Oct 7, 2024
8921cb9
9e88a2822 Roll Flutter Engine from 6b21b796cc94 to da28db8ff41d (1 re…
engine-flutter-autoroll Oct 7, 2024
d478e44
b05246d30 Roll Flutter Engine from da28db8ff41d to 3fdb546bf595 (2 re…
engine-flutter-autoroll Oct 7, 2024
33401a7
6bba08cbc Feat: Add opportunity to change CupertinoTextField suffix …
engine-flutter-autoroll Oct 7, 2024
5472a77
Catch changes to formatting in third_party
stuartmorgan Oct 7, 2024
ed6ff18
Autoformat cuppertion_icons
stuartmorgan Oct 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ead6b0d17c893109b9424aaf116a74295472cc73
6bba08cbcc516b599602673686813c6f3aa9a372
18 changes: 12 additions & 6 deletions script/tool/lib/src/format_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class FormatCommand extends PackageCommand {
super.processRunner,
super.platform,
}) {
argParser.addFlag('fail-on-change', hide: true);
argParser.addFlag(_failonChangeArg, hide: true);
argParser.addFlag(_dartArg, help: 'Format Dart files', defaultsTo: true);
argParser.addFlag(_clangFormatArg,
help: 'Format with "clang-format"', defaultsTo: true);
Expand All @@ -66,6 +66,7 @@ class FormatCommand extends PackageCommand {

static const String _dartArg = 'dart';
static const String _clangFormatArg = 'clang-format';
static const String _failonChangeArg = 'fail-on-change';
static const String _kotlinArg = 'kotlin';
static const String _javaArg = 'java';
static const String _swiftArg = 'swift';
Expand Down Expand Up @@ -109,7 +110,7 @@ class FormatCommand extends PackageCommand {
await _formatAndLintSwift(files);
}

if (getBoolArg('fail-on-change')) {
if (getBoolArg(_failonChangeArg)) {
final bool modified = await _didModifyAnything();
if (modified) {
throw ToolExit(exitCommandFoundErrors);
Expand All @@ -120,8 +121,13 @@ class FormatCommand extends PackageCommand {
Future<bool> _didModifyAnything() async {
final io.ProcessResult modifiedFiles = await processRunner.run(
'git',
<String>['ls-files', '--modified'],
workingDir: packagesDir,
<String>[
'ls-files',
'--modified',
packagesDir.path,
thirdPartyPackagesDir.path
],
workingDir: packagesDir.parent,
logOnError: true,
);
if (modifiedFiles.exitCode != 0) {
Expand All @@ -146,8 +152,8 @@ class FormatCommand extends PackageCommand {

final io.ProcessResult diff = await processRunner.run(
'git',
<String>['diff'],
workingDir: packagesDir,
<String>['diff', packagesDir.path, thirdPartyPackagesDir.path],
workingDir: packagesDir.parent,
logOnError: true,
);
if (diff.exitCode != 0) {
Expand Down
19 changes: 19 additions & 0 deletions script/tool/test/format_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,25 @@ void main() {
'https://github.com/flutter/packages/blob/main/script/tool/README.md#format-code'),
contains('patch -p1 <<DONE'),
]));

// Ensure that both packages and third_party/packages are checked.
final Directory thirdPartyDir = packagesDir.parent
.childDirectory('third_party')
.childDirectory('packages');
expect(
processRunner.recordedCalls,
containsAllInOrder(<ProcessCall>[
ProcessCall(
'git',
<String>[
'ls-files',
'--modified',
packagesDir.path,
thirdPartyDir.path
],
packagesDir.parent.path,
),
]));
});

test('fails if git ls-files fails', () async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,31 @@ void main() async {
if (kIsWeb || !Platform.isLinux) {
return;
}
final bool isMainChannel = !Platform.environment.containsKey('CHANNEL')
|| Platform.environment['CHANNEL'] == 'main'
|| Platform.environment['CHANNEL'] == 'master';
final bool isMainChannel = !Platform.environment.containsKey('CHANNEL') ||
Platform.environment['CHANNEL'] == 'main' ||
Platform.environment['CHANNEL'] == 'master';
// Only test against main to avoid rendering differences between flutter channels.
if (!isMainChannel) {
return;
}
// Load font.
final String effectiveFontFamily = const TextStyle(fontFamily: CupertinoIcons.iconFont, package: CupertinoIcons.iconFontPackage).fontFamily!;
final String effectiveFontFamily = const TextStyle(
fontFamily: CupertinoIcons.iconFont,
package: CupertinoIcons.iconFontPackage)
.fontFamily!;
final FontLoader fontLoader = FontLoader(effectiveFontFamily);
final String filePath = path.canonicalize('assets/CupertinoIcons.ttf');
final File file = File(filePath);
fontLoader.addFont(file.readAsBytes().then((Uint8List v) => v.buffer.asByteData()));
fontLoader
.addFont(file.readAsBytes().then((Uint8List v) => v.buffer.asByteData()));
await fontLoader.load();

assert(icons.isNotEmpty);
for (int index = 0; index < icons.length;) {
final int groupEndCodePoint = (icons[index].codePoint ~/ iconsPerImage + 1) * iconsPerImage;
final int next = icons.indexWhere((IconData icon) => icon.codePoint >= groupEndCodePoint, index);
final int groupEndCodePoint =
(icons[index].codePoint ~/ iconsPerImage + 1) * iconsPerImage;
final int next = icons.indexWhere(
(IconData icon) => icon.codePoint >= groupEndCodePoint, index);
final int nextIndex = next < 0 ? icons.length : next;
registerTestForIconGroup(icons.slice(index, nextIndex));
index = nextIndex;
Expand All @@ -56,19 +62,24 @@ void main() async {
// symbols are added or removed.
void registerTestForIconGroup(List<IconData> iconGroup) {
assert(iconGroup.isNotEmpty);
String hexCodePoint(int codePoint) => codePoint.toRadixString(16).toUpperCase().padLeft(4, '0');
final int groupStartCodePoint = (iconGroup.first.codePoint ~/ iconsPerImage) * iconsPerImage;
final String range = 'U+${hexCodePoint(groupStartCodePoint)}-${hexCodePoint(groupStartCodePoint + iconsPerImage - 1)}';
String hexCodePoint(int codePoint) =>
codePoint.toRadixString(16).toUpperCase().padLeft(4, '0');
final int groupStartCodePoint =
(iconGroup.first.codePoint ~/ iconsPerImage) * iconsPerImage;
final String range =
'U+${hexCodePoint(groupStartCodePoint)}-${hexCodePoint(groupStartCodePoint + iconsPerImage - 1)}';

testWidgets('font golden test: $range', (WidgetTester tester) async {
addTearDown(tester.view.reset);
const Size canvasSize = Size(iconSize * iconsPerRow, iconSize * iconsPerCol);
const Size canvasSize =
Size(iconSize * iconsPerRow, iconSize * iconsPerCol);
tester.view.physicalSize = canvasSize * tester.view.devicePixelRatio;

const Widget fillerBox = SizedBox.square(dimension: iconSize);
final List<Widget> children = List<Widget>.filled(iconsPerImage, fillerBox);
for (final IconData icon in iconGroup) {
children[icon.codePoint - groupStartCodePoint] = Icon(icon, size: iconSize);
children[icon.codePoint - groupStartCodePoint] =
Icon(icon, size: iconSize);
}

final Widget widget = Directionality(
Expand All @@ -82,6 +93,7 @@ void registerTestForIconGroup(List<IconData> iconGroup) {
),
);
await tester.pumpWidget(widget);
await expectLater(find.byType(Wrap) , matchesGoldenFile('goldens/glyph_$range.png'));
await expectLater(
find.byType(Wrap), matchesGoldenFile('goldens/glyph_$range.png'));
});
}
1,325 changes: 1,324 additions & 1 deletion third_party/packages/cupertino_icons/test/icons_list.dart

Large diffs are not rendered by default.