-
Notifications
You must be signed in to change notification settings - Fork 118
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
turn off flutter hack by default, implement methods to control it #997
Conversation
d06dff9
to
576ae8f
Compare
Looks like layoutParagraph test failed on web and linux. |
When we layout paragraph with its maxIntrinsicWidth we expect that all content will be in a single line. Some Compose code may rely on this fact e.g. https://github.com/JetBrains/compose-multiplatform-core/blob/abf3e2663cfd40cb7766546a1673c953bcaf2426/compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/TextMeasurer.kt#L320
before that it was matched because of rounding
@eymar the hack is basically truncation of some float values in paragraph e.g.
The issue is observable with Compose |
Also could you take a look what's wrong with |
skiko/src/commonTest/kotlin/org/jetbrains/skia/ParagraphTest.kt
Outdated
Show resolved
Hide resolved
|
||
@Test | ||
fun paragraphStyleRoundingHackTests() { | ||
ParagraphStyle().use { paragraphStyle -> |
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.
Changing this one to this would make k/js happy :D
@Test
fun paragraphStyleRoundingHackTests() {
ParagraphStyle().use { paragraphStyle ->
assertFalse(paragraphStyle.isApplyRoundingHackEnabled)
paragraphStyle.isApplyRoundingHackEnabled = true
assertTrue(paragraphStyle.isApplyRoundingHackEnabled)
}
}
_nGetApplyRoundingHack
returns 0 (there is no false/true in wasm). And JS equality check fails:
0 === false --> false
Not using "add a suggestion" because new imports are needed anyway.
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.
jfyi: to run the k/js tests locally:
./gradlew :cleanJsBrowserTest :jsBrowserTest -Pskiko.wasm.enabled=true -Pskiko.js.enabled=true
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.
Thanks!
Co-authored-by: Oleksandr Karpovich <[email protected]>
a88f684
to
24bb6d5
Compare
No description provided.