Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions common/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,21 @@
import("config.gni")

config("flutter_config") {
extra_warnings = []

if (is_clang) {
extra_warnings += [
"-Wshadow-all",
"-Wno-shadow-uncaptured-local",
"-Wno-shadow-field-in-constructor",
]
}

defines = feature_defines_list

cflags = extra_warnings
cflags_cc = extra_warnings
cflags_objc = extra_warnings
}

source_set("common") {
Expand Down
2 changes: 1 addition & 1 deletion runtime/dart_lifecycle_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ TEST_F(DartLifecycleTest, DISABLED_ShuttingDownTheVMShutsDownAllIsolates) {
fml::CountDownLatch latch(isolate_count);
auto vm_data = vm_ref.GetVMData();
auto thread_task_runner = GetThreadTaskRunner();
for (size_t i = 0; i < isolate_count; ++i) {
for (size_t j = 0; j < isolate_count; ++j) {
thread_task_runner->PostTask(
[vm_data, &settings, &latch, thread_task_runner]() {
ASSERT_TRUE(CreateAndRunRootIsolate(settings, *vm_data.get(),
Expand Down
31 changes: 11 additions & 20 deletions shell/platform/darwin/ios/framework/Source/FlutterViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -822,34 +822,25 @@ - (void)onAccessibilityStatusChanged:(NSNotification*)notification {
#pragma mark - Locale updates

- (void)onLocaleUpdated:(NSNotification*)notification {
NSArray<NSString*>* preferredLocales = [NSLocale preferredLanguages];
NSMutableArray<NSString*>* data = [[NSMutableArray new] autorelease];

NSMutableArray<NSLocale*>* locales = [[[NSMutableArray alloc] init] autorelease];
// Force prepend the [NSLocale currentLocale] to the front of the list
// to ensure we are including the full default locale. preferredLocales
// is not guaranteed to include anything beyond the languageCode.
NSLocale* currentLocale = [NSLocale currentLocale];
NSString* languageCode = [currentLocale objectForKey:NSLocaleLanguageCode];
NSString* countryCode = [currentLocale objectForKey:NSLocaleCountryCode];
NSString* scriptCode = [currentLocale objectForKey:NSLocaleScriptCode];
NSString* variantCode = [currentLocale objectForKey:NSLocaleVariantCode];
if (languageCode) {
[data addObject:languageCode];
[data addObject:(countryCode ? countryCode : @"")];
[data addObject:(scriptCode ? scriptCode : @"")];
[data addObject:(variantCode ? variantCode : @"")];
[locales addObject:[NSLocale currentLocale]];
// Add any secondary locales/languages to the list.
for (NSString* language : [NSLocale preferredLanguages]) {
[locales addObject:[[[NSLocale alloc] initWithLocaleIdentifier:language] autorelease]];
}

// Add any secondary locales/languages to the list.
for (NSString* localeID in preferredLocales) {
NSLocale* currentLocale = [[[NSLocale alloc] initWithLocaleIdentifier:localeID] autorelease];
NSString* languageCode = [currentLocale objectForKey:NSLocaleLanguageCode];
NSString* countryCode = [currentLocale objectForKey:NSLocaleCountryCode];
NSString* scriptCode = [currentLocale objectForKey:NSLocaleScriptCode];
NSString* variantCode = [currentLocale objectForKey:NSLocaleVariantCode];
NSMutableArray<NSString*>* data = [[NSMutableArray new] autorelease];
for (NSLocale* locale in locales) {
NSString* languageCode = [locale objectForKey:NSLocaleLanguageCode];
if (!languageCode) {
continue;
}
NSString* countryCode = [locale objectForKey:NSLocaleCountryCode];
NSString* scriptCode = [locale objectForKey:NSLocaleScriptCode];
NSString* variantCode = [locale objectForKey:NSLocaleVariantCode];
[data addObject:languageCode];
[data addObject:(countryCode ? countryCode : @"")];
[data addObject:(scriptCode ? scriptCode : @"")];
Expand Down
3 changes: 1 addition & 2 deletions third_party/txt/src/minikin/LineBreaker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,7 @@ void LineBreaker::computeBreaksOptimal(bool isRectangle) {
size_t lineNumberLast = 0;

if (!isRectangle) {
size_t lineNumberLast = mCandidates[active].lineNumber;
width = mLineWidths.getLineWidth(lineNumberLast);
width = mLineWidths.getLineWidth(mCandidates[active].lineNumber);
}
ParaWidth leftEdge = mCandidates[i].postBreak - width;
float bestHope = 0;
Expand Down
2 changes: 0 additions & 2 deletions third_party/txt/tests/CmapCoverageTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@ TEST(CmapCoverageTest, TableSelection_Priority) {
}

TEST(CmapCoverageTest, TableSelection_SkipBrokenFormat4Table) {
SparseBitSet coverage;
bool has_cmap_format_14_subtable = false;
std::vector<uint8_t> validTable =
buildCmapFormat4Table(std::vector<uint16_t>({'a', 'a'}));
Expand Down Expand Up @@ -602,7 +601,6 @@ TEST(CmapCoverageTest, TableSelection_SkipBrokenFormat4Table) {
}

TEST(CmapCoverageTest, TableSelection_SkipBrokenFormat12Table) {
SparseBitSet coverage;
bool has_cmap_format_14_subtable = false;
std::vector<uint8_t> validTable =
buildCmapFormat12Table(std::vector<uint32_t>({'a', 'a'}));
Expand Down