This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
[web] Separate text fragmenting from layout #34085
Merged
Merged
Conversation
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
c8c353d
to
7b13622
Compare
7b13622
to
9ea6cc1
Compare
yjbanov
reviewed
Aug 29, 2022
void addPlaceholder(PlaceholderSpan placeholder) { | ||
// Increase the line's height to fit the placeholder, if necessary. | ||
MeasuredFragment _updateHeightForPlaceholder(MeasuredFragment fragment) { | ||
final PlaceholderSpan placeholder = fragment.span as PlaceholderSpan; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly here. It feels like we should know ahead of time that the span is a PlaceholderSpan
without a cast 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one I couldn't figure out a clean way to remove the cast. If you have ideas, I'm happy to consider.
yjbanov
approved these changes
Oct 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gold has detected about 6 new digest(s) on patchset 45. |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Oct 18, 2022
This was referenced Jan 26, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Text layout used to be intertwined with text fragmenting. The idea originally was to do the entire layout in a single pass. But that led to extra complexity in the code and difficulty of maintenance.
With this PR, we are separating the fragmenting of the text from the layout. The high level algorithm looks roughly like this:
In addition to simplifying the code and making it more maintainable, this PR also opens up the door for a few other changes that we intend to make in the text area:
v8BreakIterator
in Chrome.This PR is necessary towards removing ICU data from CanvasKit (issue).