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

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

Merged
mdebbar merged 5 commits into
flutter-team-archive:masterfrom
mdebbar:fix_paragraph_height
Feb 10, 2021
Merged

[web] Fix text rendering issue when paragraph style is ginormous#24159
mdebbar merged 5 commits into
flutter-team-archive:masterfrom
mdebbar:fix_paragraph_height

Conversation

@mdebbar

@mdebbar mdebbar commented Feb 3, 2021

Copy link
Copy Markdown
Contributor

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-team-archive/goldens#157

Fixes the HTML renderer part of flutter/flutter#74721

@mdebbar
mdebbar force-pushed the fix_paragraph_height branch from 82c5fba to 2e86dd9 Compare February 3, 2021 18:27
@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

@yjbanov yjbanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@mdebbar
mdebbar force-pushed the fix_paragraph_height branch from 066970f to 708cefd Compare February 3, 2021 19:28
@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
Copy Markdown
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-team-archive: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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes platform-web Code specifically for the web engine

Development

Successfully merging this pull request may close these issues.

5 participants