Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@LongCatIsLooong
Copy link
Contributor

@LongCatIsLooong LongCatIsLooong commented Apr 27, 2021

Part of flutter/flutter#72521. This adds half leading as a configurable parameter to TextStyle.

Canvaskit binding changes: https://skia-review.googlesource.com/c/skia/+/398276/6/modules/canvaskit/paragraph_bindings.cpp

new golden files: https://github.com/flutter/goldens/pull/200/files

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.
  • The reviewer has submitted any presubmit flakes in this PR using the engine presubmit flakes form before re-triggering the failure.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Apr 27, 2021
@google-cla google-cla bot added the cla: yes label Apr 27, 2021
@LongCatIsLooong
Copy link
Contributor Author

LongCatIsLooong commented Apr 27, 2021

Getting "Can't load Kernel binary: Invalid kernel binary format version." when I run the tests via felt. Tried deleting src/out and reruning gclient sync -D but to no avail. nvm, the wiki had the solution all along.

),
);
await testTextStyle(
'half leading',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first argument is used as part of the golden screenshot file name, so it should be distinct from previous tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops forgot to push. Fixed.

skStrutStyle.heightMultiplier = style._height;
}

switch (style._leadingDistribution ?? paragraphHeightBehavior?.leadingDistribution) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd extract the switch expression into a variable. Typically we use "effective" as the prefix for something that's resolved from multiple sources, e.g. effectiveLeadingDistribution.

@LongCatIsLooong LongCatIsLooong force-pushed the canvaskit-halfleading branch from 49d0312 to b794586 Compare May 6, 2021 21:23
@LongCatIsLooong LongCatIsLooong marked this pull request as ready for review May 6, 2021 22:17
@LongCatIsLooong LongCatIsLooong requested a review from yjbanov May 6, 2021 22:17
Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@LongCatIsLooong LongCatIsLooong added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label May 13, 2021
@fluttergithubbot fluttergithubbot merged commit 589f514 into flutter:master May 13, 2021
@LongCatIsLooong LongCatIsLooong deleted the canvaskit-halfleading branch May 13, 2021 22:46
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 14, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 14, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 14, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 14, 2021
cbracken pushed a commit to flutter/flutter that referenced this pull request May 14, 2021
* 0f28cd6 [uwptool] Add uninstall command (flutter/engine#26122)

* cf18983 Fix composition when multiple platform views and layers are combined  (flutter/engine#25900)

* c118a13 Add missing semantics flag for embedder (flutter/engine#25932)

* e0418d2 [fuchsia] rename SessionConnection to DefaultSessionConnection (flutter/engine#26104)

* 589f514 add `TextLeadingDistribution` to webui `TextStyle` (flutter/engine#25777)

* 2ef73bf Add support for System.channelWriteEtc and System.channelQueryAndReadEtc. (flutter/engine#26050)

* 247d1d9 Roll Fuchsia Linux SDK from WYD7atCH7... to uffIHSwYt... (flutter/engine#26131)

* 7e34f1f Revert "SceneBuilder.addPicture returns the layer (#26074)" (flutter/engine#26133)

* 26a48f1 Roll Dart SDK from c119194b23d9 to ba8506bdcef7 (2 revisions) (flutter/engine#26135)

* 0fc5600 Fix GIR transfer annotation

* b8072ae Roll Skia from ca9f6a855071 to 3193a04b09d8 (21 revisions) (flutter/engine#26136)

* 2071b03 Roll Fuchsia Mac SDK from mdsssGtoC... to y3xw-lhxW... (flutter/engine#26137)

* 6fb2f94 web: improve engine dev cycle on Windows (flutter/engine#25812)

* 8773295 Windows: UWP ViewController accepts a CoreApplicationView and exposes to plugins (flutter/engine#25879)

* 0507f4a Revert "Fix composition when multiple platform views and layers are combined  (#25900)" (flutter/engine#26142)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes platform-web Code specifically for the web engine waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants