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
Integrate Strut: Add StrutStyle, expose Strut API, wire up strut with dart:ui, Roll engine 31a7f4d..e7eb1c8 (7 commits) #26332
Conversation
cc @Hixie This includes the API changes we talked about. |
Some points to note: The strut default values are defined in the engine instead of the framework. This is so that the minimal amount of information is necessary to pass between dart and native. The framework is capable of passing nothing to native to indicate usage of default properties. The way the data is serialized allows for all non-strut uses to pass zero bytes to native.This adds minimal overhead to use cases without strut (the vast majority of text). When a strut is used, the minimal data passed is one byte with each additional property adding only its own size to the serialization. For example, a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks pretty good, most of the feedback is small potatoes. I think there could be a little more clarity about exactly how StrutStyle maps to line heights and baselines, and some guidance about when would an app need to specify strut styles.
LGTM with minor comments, but the bots aren't happy. |
Need to land the engine change, roll the engine manually, update goldens, and update assets-for-api-docs before everything can go green. It is working locally. |
Engine half of flutter/flutter#26332
For reference: @dnfield brought up compatibility with Flutter SVG plugin when it used lineHeight in a previous version. |
This seems to have regressed flutter_gallery_ios32__transition_perf 99th_percentile_frame_build_time_millis pretty badly (up to 30%-100%). |
I suspect that that was caused by the machine in devicelab being bad. The regression is relative to an improvement that coincides with when I was in devicelab rebooting machines, and the PR where it improved is otherwise innocuous. |
… dart:ui, Roll engine 31a7f4d..e7eb1c8 (7 commits) (flutter#26332) Includes a breaking change to dart:ui ParagraphStyle where lineHeight is renamed to height for consistency with TextStyle.
This is the framework-half of the work to implement strut. See #26085.
The engine half can be found in flutter/engine#7414
This PR adds class
StrutStyle
, and introduces it as a new parameter to Text, RichText, TextPainter, and RenderParagraph. StrutStyle defines the properties necessary to fully define a strut.git log --oneline --no-merges 31a7f4d..e7eb1c8
e7eb1c8 Update the verify_exported script to include the symbols for ICU data (#7647)
b032bbd Roll src/third_party/skia 70ebd9ca0616..9c8ad0316147 (9 commits) (#7646)
2c610bf Fix dynamic array -> vector (#7645)
09a3735 Respect default goma path on Windows (#7643)
050dcaa Embed ICU data inside libflutter.so on Android (#7588)
c92df42 Strut implementation (#7414)
15f2b92 Roll src/third_party/skia 673a048b209c..70ebd9ca0616 (8 commits) (#7641)