This repository was archived by the owner on Feb 25, 2025. It is now read-only.
libtxt: have GetRectsForRange(strut) fall back to tight bounds if layout isn't forcing use of the strut#9058
Merged
jason-simmons merged 1 commit intoflutter:masterfrom May 22, 2019
Conversation
GaryQian
reviewed
May 22, 2019
third_party/txt/src/txt/paragraph.cc
Outdated
| box.rect.fLeft, line_baselines_[kv.first] - strut_.ascent, | ||
| box.rect.fRight, line_baselines_[kv.first] + strut_.descent), | ||
| box.direction); | ||
| if (strut_.force_strut) { |
Contributor
There was a problem hiding this comment.
Try paragraph_style_.strut_enabled && paragraph_style_.strut_font_size >= 0 as the condition?
Member
Author
There was a problem hiding this comment.
Updated this to use the same criteria as valid_strut in ComputeStrut
10df3b6 to
034ba19
Compare
GaryQian
reviewed
May 22, 2019
| box.rect.fLeft, line_baselines_[kv.first] - strut_.ascent, | ||
| box.rect.fRight, line_baselines_[kv.first] + strut_.descent), | ||
| box.direction); | ||
| if (IsStrutValid()) { |
Contributor
There was a problem hiding this comment.
Can you document this fallback behavior here as well as in the enum declaration?
Contributor
|
Please add a test to verify that disabled strut returns tight bounds |
034ba19 to
e06c1df
Compare
…out isn't forcing use of the strut
e06c1df to
b9c7863
Compare
Member
Author
|
Done - PTAL |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 24, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 25, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 25, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 25, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 25, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 25, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 25, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
This was referenced May 25, 2019
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 26, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 26, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 28, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 28, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 28, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
This was referenced May 28, 2019
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 28, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 28, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 28, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
This was referenced May 28, 2019
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 28, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 29, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 29, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 29, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 29, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 29, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 29, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 30, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
May 30, 2019
…s if layout isn't forcing use of the strut (flutter/engine#9058)
huqiuser
pushed a commit
to huqiuser/engine
that referenced
this pull request
Jun 12, 2019
…out isn't forcing use of the strut (flutter#9058)
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 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.
No description provided.