Skip to content

Commit

Permalink
Manual roll Flutter from ead6b0d17c89 to 6bba08cbcc51 (37 revisions) (#…
Browse files Browse the repository at this point in the history
…7809)

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

Manual roll requested by [email protected]

flutter/flutter@ead6b0d...6bba08c

2024-10-01 [email protected]  Feat: Add opportunity to change CupertinoTextField suffix alignment (flutter/flutter#154601)
2024-10-01 [email protected] Roll Flutter Engine from da28db8ff41d to 3fdb546bf595 (2 revisions) (flutter/flutter#155993)
2024-10-01 [email protected] Roll Flutter Engine from 6b21b796cc94 to da28db8ff41d (1 revision) (flutter/flutter#155985)
2024-10-01 [email protected] Roll Flutter Engine from 259f56c6e91b to 6b21b796cc94 (1 revision) (flutter/flutter#155983)
2024-10-01 [email protected] Roll Flutter Engine from 6ee04ed763d9 to 259f56c6e91b (1 revision) (flutter/flutter#155981)
2024-10-01 [email protected] Roll Flutter Engine from bfb6dddb2b30 to 6ee04ed763d9 (3 revisions) (flutter/flutter#155978)
2024-10-01 [email protected] Roll Flutter Engine from e61bc853acb2 to bfb6dddb2b30 (8 revisions) (flutter/flutter#155967)
2024-10-01 [email protected] Disable flaky menu test  (flutter/flutter#155968)
2024-10-01 [email protected] Fix crash in Linux platform channel example. (flutter/flutter#155735)
2024-09-30 [email protected] Fix leak in input_decorator [prod-leak-fix] (flutter/flutter#155885)
2024-09-30 [email protected] Move platform specific text selection behavior out of styled TextField classes (flutter/flutter#155774)
2024-09-30 [email protected] Roll Flutter Engine from b466a0dd7834 to e61bc853acb2 (5 revisions) (flutter/flutter#155952)
2024-09-30 [email protected] `RenderParagraph`s `_SelectableFragment.boundingBoxes` should consider max line height (flutter/flutter#155892)
2024-09-30 [email protected] Roll Packages from 0321757 to 27c9853 (3 revisions) (flutter/flutter#155945)
2024-09-30 [email protected] Roll Flutter Engine from f4507e7a4beb to b466a0dd7834 (1 revision) (flutter/flutter#155944)
2024-09-30 [email protected] when `ResidentRunner.tryInitLogReader` fails, only log warning on Android (flutter/flutter#155800)
2024-09-30 [email protected] Move FlutterLogo from material to widget (flutter/flutter#155864)
2024-09-30 [email protected] fix: support android 15 16k page size for template plugin_ffi  (flutter/flutter#155508)
2024-09-30 [email protected] Roll Flutter Engine from daf126b38b8f to f4507e7a4beb (1 revision) (flutter/flutter#155932)
2024-09-30 [email protected] Roll Flutter Engine from 734205fbcd62 to daf126b38b8f (1 revision) (flutter/flutter#155929)
2024-09-30 [email protected] Roll Flutter Engine from 338f09c4ea72 to 734205fbcd62 (1 revision) (flutter/flutter#155923)
2024-09-30 [email protected] Roll Flutter Engine from 897f5caffe2d to 338f09c4ea72 (2 revisions) (flutter/flutter#155917)
2024-09-30 [email protected] Roll Flutter Engine from 569abc4044b8 to 897f5caffe2d (1 revision) (flutter/flutter#155912)
2024-09-29 [email protected] Roll Flutter Engine from c4784aa7eade to 569abc4044b8 (2 revisions) (flutter/flutter#155894)
2024-09-28 [email protected] Roll Flutter Engine from ff4541712df4 to c4784aa7eade (2 revisions) (flutter/flutter#155889)
2024-09-28 [email protected] Fixes column text width calculation in CupertinoDatePicker (flutter/flutter#151128)
2024-09-28 [email protected] Roll Flutter Engine from 380fd814448c to ff4541712df4 (1 revision) (flutter/flutter#155886)
2024-09-28 [email protected] Optimize `Overlay` sample to avoid overflow (flutter/flutter#155861)
2024-09-28 [email protected] Roll Flutter Engine from f3b11bcd9c37 to 380fd814448c (1 revision) (flutter/flutter#155876)
2024-09-28 [email protected] Roll Flutter Engine from 9c8e5cb226e4 to f3b11bcd9c37 (3 revisions) (flutter/flutter#155865)
2024-09-28 [email protected] Roll Flutter Engine from f9e4ed28f103 to 9c8e5cb226e4 (1 revision) (flutter/flutter#155857)
2024-09-27 [email protected] Roll Flutter Engine from f21f2b232b8a to f9e4ed28f103 (2 revisions) (flutter/flutter#155855)
2024-09-27 [email protected] Add  magnificationScale to CupertinoMagnifier for Zoom Effect (flutter/flutter#155276)
2024-09-27 [email protected] Fix typo on theme_data (flutter/flutter#155644)
2024-09-27 [email protected] Roll Flutter Engine from 7c603de2dca7 to f21f2b232b8a (6 revisions) (flutter/flutter#155843)
2024-09-27 [email protected] Turn the packages roller bot back on (flutter/flutter#155842)
2024-09-27 [email protected] Roll Packages from f38b780 to 0321757 (4 revisions) (flutter/flutter#155832)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

...
  • Loading branch information
engine-flutter-autoroll authored Oct 8, 2024
1 parent e21f1ee commit 5cda4c6
Show file tree
Hide file tree
Showing 5 changed files with 1,381 additions and 21 deletions.
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.

0 comments on commit 5cda4c6

Please sign in to comment.