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

Conversation

@mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Dec 9, 2020

Description

The new rich text implementation needs DOM rulers only for height measurements. This PR refactors out a height ruler so that it can be used by rich text without needing to go through all the legacy ruler stuff.

The new height ruler is also better cacheable since it uses only a subset of styles that affect the height, instead of using the entire ParagraphGeometricStyle as a cache key.

Tests

There are already many tests that verify height measurements are correct.

I added several checks for alphabeticBaseline because I noticed they weren't covered by existing tests.

@mdebbar mdebbar added the platform-web Code specifically for the web engine label Dec 9, 2020
@google-cla google-cla bot added the cla: yes label Dec 9, 2020
@mdebbar mdebbar force-pushed the ruler_height branch 3 times, most recently from 2b4dfe6 to 4662e8d Compare December 11, 2020 22:26
@mdebbar mdebbar requested a review from ferhatb December 11, 2020 22:30
@mdebbar mdebbar marked this pull request as ready for review December 11, 2020 22:30
final List<ui.FontFeature>? fontFeatures;

@override
bool operator ==(Object other) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: form a signature in constructor so looks can simply compare _signature instead for fast map lookups.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@mdebbar mdebbar 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 Dec 14, 2020
@fluttergithubbot fluttergithubbot merged commit 5d0310f into flutter:master Dec 14, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 14, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 15, 2020
gspencergoog pushed a commit to gspencergoog/engine that referenced this pull request Jan 5, 2021
@mdebbar mdebbar deleted the ruler_height branch April 15, 2021 17:35
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