Skip to content
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

[web] Fix text rendering issue when paragraph style is ginormous #24159

Merged
merged 5 commits into from Feb 10, 2021

Conversation

mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Feb 3, 2021

When a paragraph has ginormous styles (e.g. fontSize=48.0) but all spans have small styles (e.g. fontStyle=14.0) this causes the DomCanvas to render the paragraph incorrectly. The <p> element has the huge font size which affects the layout of the paragraph, even though none of its children inherits the huge font size.

Since all spans already set their own font size (they inherit from the paragraph style if necessary), there's no need to set these CSS properties at the paragraph level anyway.

Goldens PR: flutter/goldens#157

Fixes the HTML renderer part of flutter/flutter#74721

@mdebbar mdebbar requested a review from ferhatb February 3, 2021 19:11
@mdebbar mdebbar added the platform-web Code specifically for the web engine label Feb 3, 2021
@mdebbar mdebbar marked this pull request as ready for review February 3, 2021 19:11
@mdebbar mdebbar requested a review from yjbanov February 3, 2021 19:14
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

@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 Feb 10, 2021
@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite build_and_test_linux_unopt_debug has failed. Please fix the issues identified (or deflake) before re-applying this label.

@fluttergithubbot fluttergithubbot removed the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Feb 10, 2021
@mdebbar mdebbar merged commit e8b05bf into flutter:master Feb 10, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 10, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 11, 2021
@mdebbar mdebbar deleted the fix_paragraph_height branch April 15, 2021 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes platform-web Code specifically for the web engine
Projects
None yet
5 participants