This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7adb07a
to
092a8be
Compare
092a8be
to
7d2406e
Compare
47d6148
to
19267ba
Compare
19267ba
to
e4188c6
Compare
eb26d3c
to
e8e51ac
Compare
mdebbar
approved these changes
May 23, 2024
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.
cc @eyebrowsoffire for skwasm.
The web bits look good to me.
eyebrowsoffire
suggested changes
May 23, 2024
@@ -94,6 +94,42 @@ void testMain() { | |||
expect(await matchImage(tabImage, tofuImage), isFalse); | |||
}); | |||
|
|||
test('kTextHeightNone unsets the height multiplier', () { |
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.
Can you move these tests into one of the text tests under flutter/lib/web_ui/test/ui
so that it runs on all the renderers instead of just CanvasKit? As-is, these unit tests are not testing skwasm.
jason-simmons
approved these changes
May 23, 2024
eyebrowsoffire
approved these changes
May 23, 2024
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.
LGTM
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 24, 2024
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 24, 2024
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
May 24, 2024
…149011) flutter/engine@768c90e...d78f667 2024-05-24 [email protected] Roll Skia from 2ef772706cda to f2053e772e6f (1 revision) (flutter/engine#53009) 2024-05-24 [email protected] Roll Dart SDK from 7809d6e332ff to 9d7324ea563a (7 revisions) (flutter/engine#53008) 2024-05-24 [email protected] Allow unsetting `TextStyle.height` (flutter/engine#52940) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
9 tasks
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
May 29, 2024
Fixes: #58765 The rationale for the choice of the sentinel value: flutter/engine#52940 The exact value of `kTextHeightNone` should be kept as an implementation detail. It's unfortunate that the current value `0` is dangerously close to `TextStyle.height`'s valid domain. If we ever allow `TextStyle.height == 0` (which totally makes sense) then it shouldn't be difficult to change the const.
victorsanni
pushed a commit
to victorsanni/flutter
that referenced
this pull request
May 31, 2024
…lutter#149011) flutter/engine@768c90e...d78f667 2024-05-24 [email protected] Roll Skia from 2ef772706cda to f2053e772e6f (1 revision) (flutter/engine#53009) 2024-05-24 [email protected] Roll Dart SDK from 7809d6e332ff to 9d7324ea563a (7 revisions) (flutter/engine#53008) 2024-05-24 [email protected] Allow unsetting `TextStyle.height` (flutter/engine#52940) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
victorsanni
pushed a commit
to victorsanni/flutter
that referenced
this pull request
May 31, 2024
Fixes: flutter#58765 The rationale for the choice of the sentinel value: flutter/engine#52940 The exact value of `kTextHeightNone` should be kept as an implementation detail. It's unfortunate that the current value `0` is dangerously close to `TextStyle.height`'s valid domain. If we ever allow `TextStyle.height == 0` (which totally makes sense) then it shouldn't be difficult to change the const.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
autosubmit
Merge PR when tree becomes green via auto submit App
platform-web
Code specifically for the web engine
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces a sentinel value
kTextHeightNone
forui.TextStyle.height
which can be used to "unset" the currentTextStyle.height
(and for consistency, it applies toStructStyle.height
andParagraphStyle.height
too). Documentation ofTextStyle.height
can be found here (the one frompainting
library notdart:ui
).part of flutter/flutter#58765: currently
TextStyle.height
usesnull
as the sentinel value for "no height multiplier specified, use the font height", which has conflicting semantics: it means the height multiplier is not set (so the span height is determined by font metrics) but in reality it also means the height should inherit from its parent span (or incopyWith
context, it means do not override the height).The new sentinel value
kTextHeightNone
is currently set to0.0
. This is because skparagraph internally uses 0 for "no height multiplier", so using 0 should minimize the behavior change:https://github.com/google/skia/blob/62f369c759947272dfdd2d8f060afadbcc361e79/modules/skparagraph/src/Run.cpp#L65-L67
This MAY still change the current behavior: for consistency setting
StructStyle.height
/ParagraphStyle.height
to the sentinel value also unsets the height multiplier which may not be the current behavior.Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.