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 Jan 26, 2021

When drawing text on canvas, we use the correct alignment offsets for each line.
When drawing text on DOM, we do set text-align correctly, but we don't take alignment offset into consideration. So the paragraph ends up not aligned correctly.

In addition, I discovered another issue where decorations are also not being drawn correctly. So this PR fixes that too.

Goldens PR: flutter/goldens#149

Fixes flutter/flutter#74673

@mdebbar mdebbar added the platform-web Code specifically for the web engine label Jan 26, 2021
@mdebbar mdebbar requested review from ferhatb and yjbanov January 26, 2021 19:35
@google-cla google-cla bot added the cla: yes label Jan 26, 2021
@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 Jan 26, 2021
@mdebbar mdebbar merged commit 40c3a97 into flutter:master Jan 26, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 26, 2021
christopherfujino added a commit that referenced this pull request Feb 3, 2021
…24142)

* add ffi_allocation_patch.dart to libraries.yaml 2 (#23954)

* Use `runes` to get code units in CanvasKit. (#24024)

* [windows] Honor only valid resize requests (#23990)

* Load FlutterLoader when creating FlutterEngineGroup (#23980)

* [canvaskit] remove the DOM node of unrendered platform view (#24001)

* update dart to 2.12.0-259.8.beta

* [web] Fix svg based stroke rendering. (#23969)

* [canvaskit] fix text background, foreground, color; add text style tests (#23800)

* [canvaskit] fix text background, foreground, familyFallback; add style tests

* add leak test

* update goldens_lock.yaml

* remove solo

* Warn when popping out of empty text style stack

* [web] Fix alignment issue in rich paragraphs (#23965)

* [web] Implement CanvasParagraph.getLineBoundary (#24037)

* [web] Fix text alignment when transform + tight constraints + DOM rendering (#24036)

* update licenses_third_party golden

Co-authored-by: Daco Harkes <[email protected]>
Co-authored-by: Harry Terkelsen <[email protected]>
Co-authored-by: Kaushik Iska <[email protected]>
Co-authored-by: xster <[email protected]>
Co-authored-by: Yegor <[email protected]>
Co-authored-by: Ferhat <[email protected]>
Co-authored-by: Mouad Debbar <[email protected]>
hjfreyer pushed a commit to hjfreyer/engine that referenced this pull request Mar 22, 2021
@mdebbar mdebbar deleted the rich_dom_alignment 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.

[web] TextField with TextAlign.center and TextAlign.right is not working properly when using --web-renderer html

2 participants