Skip to content

Commit 4f0da4c

Browse files
committed
Merge branch 'main' of https://github.com/facebook/react-native into accessibilityinfo_isdarkersystemcolorsenabled_unresolved_promise
2 parents 0104aa5 + d527f2d commit 4f0da4c

6 files changed

Lines changed: 26 additions & 16 deletions

File tree

packages/debugger-frontend/BUILD_INFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@generated SignedSource<<541ade34cd7ba2fc1f21d1cb5c23141c>>
2-
Git revision: 8edd9be3b89dbc710cb4c5f8dda2f2bb68cc2426
1+
@generated SignedSource<<06b58bc7c9ba92605c093ab30f1bcad6>>
2+
Git revision: 571dc30a5de05c09d6734fd38f6a6c279d5d7ec2
33
Built with --nohooks: false
44
Is local checkout: false
55
Remote URL: https://github.com/facebook/react-native-devtools-frontend

packages/debugger-frontend/dist/third-party/front_end/core/i18n/locales/en-US.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

packages/debugger-frontend/dist/third-party/front_end/core/rn_experiments/rn_experiments.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/debugger-frontend/dist/third-party/front_end/entrypoints/rn_fusebox/rn_fusebox.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/debugger-frontend/dist/third-party/front_end/panels/timeline/timeline.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,14 +1376,24 @@ internal object TextLayoutManager {
13761376
return FontMetricsUtil.getFontMetrics(layout.text, layout, context)
13771377
}
13781378

1379-
private fun isBoring(text: Spannable, paint: TextPaint): BoringLayout.Metrics? =
1380-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
1381-
BoringLayout.isBoring(text, paint)
1382-
} else {
1383-
// Default to include fallback line spacing on Android 13+, like TextView
1384-
// https://cs.android.com/android/_/android/platform/frameworks/base/+/78c774defb238c05c42b34a12b6b3b0c64844ed7
1385-
BoringLayout.isBoring(text, paint, TextDirectionHeuristics.FIRSTSTRONG_LTR, true, null)
1386-
}
1379+
private fun isBoring(text: Spannable, paint: TextPaint): BoringLayout.Metrics? {
1380+
val metrics =
1381+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
1382+
BoringLayout.isBoring(text, paint)
1383+
} else {
1384+
// Default to include fallback line spacing on Android 13+, like TextView
1385+
// https://cs.android.com/android/_/android/platform/frameworks/base/+/78c774defb238c05c42b34a12b6b3b0c64844ed7
1386+
BoringLayout.isBoring(text, paint, TextDirectionHeuristics.FIRSTSTRONG_LTR, true, null)
1387+
}
1388+
1389+
// BoringLayout.isBoring() sometimes thinks text width is negative for some strings, even on
1390+
// Android 15+. Fallback to StaticLayout.
1391+
if (metrics == null || metrics.width < 0) {
1392+
return null
1393+
}
1394+
1395+
return metrics
1396+
}
13871397

13881398
private class CreateLayoutResult(
13891399
val layout: Layout,

0 commit comments

Comments
 (0)