- 10 Aug, 2023 1 commit
-
-
LongCatIsLooong authored
Migrate tests in flutter/flutter. Once the tests here and in `*_customer_testing` are migrated, the default value of the migration flag will be changed from false to true, making the rounding hack disabled by default.
-
- 17 Jul, 2023 1 commit
-
-
LongCatIsLooong authored
Deprecate `textScaleFactor` in favor of `textScaler`, in preparation for Android 14 [Non-linear font scaling to 200%](https://developer.android.com/about/versions/14/features#non-linear-font-scaling). The `TextScaler` class can be moved to `dart:ui` in the future, if we decide to use the Android platform API or AndroidX to get the scaling curve instead of hard coding the curve in the framework. I haven't put the Flutter version in the deprecation message so the analyzer checks are failing. Will do so after I finish the migration guide. **Why `TextScaler.textScaleFactor`** The author of a `TextScaler` subclass should provide a fallback `textScaleFactor`. By making `TextScaler` also contain the `textScaleFactor` information it also makes it easier to migrate: if a widget overrides `MediaQueryData.textScaler` in the tree, for unmigrated widgets in the subtree it would also have to override `MediaQueryData.textScaleFactor`, and that makes it difficult to remove `MediaQueryData.textScaleFactor` in the future. ## A full list of affected APIs in this PR Deprecated: The method/getter/setter/argument is annotated with a `@Deprecated()` annotation in this PR, and the caller should replace it with `textScaler` instead. Unless otherwise specified there will be a Flutter fix available to help with migration but it's still recommended to migrate case-by-case. **Replaced**: The method this `textScaleFactor` argument belongs to is rarely called directly by user code and is not overridden by any of the registered custom tests, so the argument is directly replaced by `TextScaler`. **To Be Deprecated**: The method/getter/setter/argument can't be deprecated in this PR because a registered customer test depends on it and a Flutter fix isn't available (or the test was run without applying flutter fixes first). This method/getter/setter/argument will be deprecated in a followup PR once the registered test is migrated. ### `Painting` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `InlineSpan.build({ double textScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getParagraphStyle({ double TextScaleFactor = 1.0 })` argument | **Replaced** | | | `TextStyle.getTextStyle({ double TextScaleFactor = 1.0 })` argument| Deprecated | Can't replace: https://github.com/superlistapp/super_editor/blob/c47fd38dca4b7f43611690913b551a1773c563d7/super_editor/lib/src/infrastructure/super_textfield/desktop/desktop_textfield.dart#L1903-L1905| | `TextPainter({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `TextPainter.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `TextPainter.computeWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | | `TextPainter.computeMaxIntrinsicWidth({ double TextScaleFactor = 1.0 })` argument | Deprecated | | ### `Rendering` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `RenderEditable({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderEditable.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | | `RenderParagraph({ double TextScaleFactor = 1.0 })` constructor argument | Deprecated | | | `RenderParagraph.textScaleFactor` getter and setter | Deprecated | No Flutter Fix, not expressible yet | ### `Widgets` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `MediaQueryData({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/test/text_scale_factor_test.dart#LL39C21-L39C35 | | `MediaQueryData.textScaleFactor` getter | Deprecated | | | `MediaQueryData.copyWith({ double? TextScaleFactor })` argument | Deprecated | | | `MediaQuery.maybeTextScaleFactorOf(BuildContext context)` static method | Deprecated | No Flutter Fix, not expressible yet | | `MediaQuery.textScaleFactorOf(BuildContext context)` static method | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/_functions_io.dart#L68-L70, No Flutter Fix, not expressible yet | | `RichText({ double TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843 | | `RichText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away| | `Text({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/914d120da12fba458c020210727831c31bd71041/packages/rfw/lib/src/flutter/core_widgets.dart#L647 , No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `Text.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `Text.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | | `EditableText({ double? TextScaleFactor = 1.0 })` constructor argument | Deprecated | No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `EditableText.textScaleFactor` getter | Deprecated | | ### `Material` Library | Affected API | State of `textScaleFactor` | Comment | | --- | --- | --- | | `SelectableText({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | https://github.com/flutter/packages/blob/cd7b93532e5cb605a42735e20f1de70fc00adae7/packages/flutter_markdown/lib/src/builder.dart#L829-L843, No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `SelectableText.rich({ double? TextScaleFactor = 1.0 })` constructor argument | **To Be Deprecated** | The default constructor has an argument that can't be deprecated right away. No Flutter Fix because of https://github.com/dart-lang/sdk/issues/52664 | | `SelectableText.textScaleFactor` getter | **To Be Deprecated** | A constructor argument can't be deprecated right away | A lot of material widgets (`Slider`, `RangeSlider`, `TimePicker`, and different types of buttons) also change their layout based on `textScaleFactor`. These need to be handled in a case-by-case fashion and will be migrated in follow-up PRs.
-
- 14 Jul, 2023 1 commit
-
-
LongCatIsLooong authored
-
- 30 May, 2023 1 commit
-
-
Tomasz Gucio authored
-
- 26 May, 2023 1 commit
-
-
LongCatIsLooong authored
To opt-in, run the tests with: `SKPARAGRAPH_REMOVE_ROUNDING_HACK=1 flutter test --dart-define=SKPARAGRAPH_REMOVE_ROUNDING_HACK=1 ` Migration plans: 1. Turn the flags on in CI, migrate customer tests if needed 1. Migrate internal customers 2. Remove the flag from skparagraph. Remove the framework flag with a manual engine roll. Also fixes https://github.com/flutter/flutter/issues/52038
-
- 24 May, 2023 1 commit
-
-
LongCatIsLooong authored
Improves `TextPainter.layout` caching when only the input constraints change: - removes the double layout calls in `TextPainter._layoutParagraph`: now double layout is only needed when `TextAlign` is not left, and the input `maxWidth == double.infinity`. - skip calls to `ui.Paragraph.layout` when it's guaranteed that there's no soft line breaks before/after the layout call. This doesn't introduce new APIs but may slightly shift text rendered on screen. This reduces the number of `layout` calls but since shaping results are already cached so it only skips the relatively cheap line-breaking process when possible. 528 scuba failures but all of them seem reasonable.
-
- 23 May, 2023 1 commit
-
-
Tomasz Gucio authored
-
- 28 Mar, 2023 1 commit
-
-
Greg Price authored
Fix out-of-bounds and reversed TextBox queries in computing caret metrics
-
- 24 Mar, 2023 1 commit
-
-
LongCatIsLooong authored
Unskip #62819 Fixes #12357
-
- 09 Mar, 2023 1 commit
-
-
LongCatIsLooong authored
Reland "Update test font (#121306)"
-
- 06 Mar, 2023 2 commits
-
-
LongCatIsLooong authored
This reverts commit 9f69a367.
-
LongCatIsLooong authored
Update test font
-
- 13 Dec, 2022 1 commit
-
-
LongCatIsLooong authored
* remove RenderEditable textPainter height hack * Still applies the hack on web * unskip web
-
- 25 Oct, 2022 1 commit
-
-
Tomasz Gucio authored
-
- 27 Sep, 2022 1 commit
-
-
LongCatIsLooong authored
-
- 13 Sep, 2022 1 commit
-
-
Dan Field authored
-
- 06 Sep, 2022 1 commit
-
-
Dan Field authored
-
- 01 Aug, 2022 1 commit
-
-
Tomasz Gucio authored
Override PlaceholderDimensions equality operator to avoid unnecessary TextPainter re-layouts (#108623)
-
- 30 Jul, 2022 1 commit
-
-
LongCatIsLooong authored
-
- 22 Feb, 2022 1 commit
-
-
chunhtai authored
-
- 03 Feb, 2022 1 commit
-
-
Jason Simmons authored
-
- 08 Oct, 2021 3 commits
-
-
Ian Hickson authored
-
Zachary Anderson authored
This reverts commit 5fd259be.
-
Ian Hickson authored
-
- 11 Sep, 2021 1 commit
-
-
LongCatIsLooong authored
-
- 03 Aug, 2021 1 commit
-
-
Darren Austin authored
-
- 26 Jul, 2021 1 commit
-
-
Harry Terkelsen authored
-
- 01 Jul, 2021 1 commit
-
-
Ahmed Ashour authored
-
- 24 Jun, 2021 1 commit
-
-
Jason Simmons authored
-
- 09 Mar, 2021 1 commit
-
-
LongCatIsLooong authored
-
- 02 Feb, 2021 1 commit
-
-
Sam Rawlins authored
In each library where an import is removed, the library uses some elements provided by the import, BUT there is another import which provides all of the same elements, and at least one more which the library uses. In this change, we remove the imports which can be simply removed in favor of the other already present imports. See https://github.com/dart-lang/sdk/issues/44569 for more information.
-
- 08 Oct, 2020 1 commit
-
-
Jason Simmons authored
-
- 06 Oct, 2020 1 commit
-
-
Michael Goderbauer authored
-
- 23 Sep, 2020 1 commit
-
-
Gary Qian authored
-
- 31 Aug, 2020 1 commit
-
-
Chris Bracken authored
Flutter's `moreOrLessEquals` has a few advantages over `closeTo` from the `matcher` package: * It emits the epsilon value in the test result on failure. * It uses a named parameter for epsilon, which improves readability at the call site. * It has a reasonable default for epsilon in cases where something more specific isn't required. Using it also has the nice property that it aids in its own discovery when when people go looking for such functionality in new tests. This change also includes a couple unrelated whitespace formatting cleanups.
-
- 19 Aug, 2020 3 commits
-
-
Jonah Williams authored
Reland of acdb909f with fixes to semantics.dart #61042
-
Jenn Magder authored
This reverts commit acdb909f.
-
Jonah Williams authored
-
- 04 Aug, 2020 1 commit
-
-
Ian Hickson authored
-
- 23 Jun, 2020 1 commit
-
-
Justin McCandless authored
Use Dart's characters package to fix user-facing grapheme cluster bugs.
-