Repository navigation
Conversation
Summary: Fantom didn't deliver `onTextLayout`: the platform-agnostic C++ `TextLayoutManager` had no `measureLines`, so `ParagraphShadowNode` only logged a warning. This adds a virtual `measureLines` to that `TextLayoutManager`, whose base implementation returns no lines. Fantom's `FantomTextLayoutManager` overrides it with the layout it paints screenshots with, so `onTextLayout` reports the lines Fantom draws. - Text cut by `numberOfLines` ends with a tail ellipsis in the reported lines and the screenshot, except after an inline view or emoji on the last line. - Selectable text is now painted, and baseline alignment uses the measured lines. - Other users of the C++ `TextLayoutManager` measure no lines: they no longer log the warning and still send no `onTextLayout` event. Changelog: [Internal] Reviewed By: rubennorte Differential Revision: D134743317
markv
force-pushed
the
export-D134743317
branch
from
November 27, 2026 16:36
60addfa to
6cc04ed
Compare
rubennorte
approved these changes
Nov 27, 2026
rubennorte
left a comment
Member
There was a problem hiding this comment.
Review automatically exported from Phabricator review in Meta.
|
@markv has exported this pull request. If you are a Meta employee, you can view the originating Diff in D134743317. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fantom didn't deliver
onTextLayout: the platform-agnostic C++TextLayoutManagerhad nomeasureLines, soParagraphShadowNodeonly logged a warning.This adds a virtual
measureLinesto thatTextLayoutManager, whose base implementation returns no lines. Fantom'sFantomTextLayoutManageroverrides it with the layout it paints screenshots with, soonTextLayoutreports the lines Fantom draws.numberOfLinesends with a tail ellipsis in the reported lines and the screenshot, except after an inline view or emoji on the last line.TextLayoutManagermeasure no lines: they no longer log the warning and still send noonTextLayoutevent.Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D134743317