Unverified Commit 19a83549 authored by creativecreatorormaybenot's avatar creativecreatorormaybenot Committed by GitHub

Correct typos in RenderParagraph (#72930)

parent 6e5f55fb
...@@ -266,11 +266,10 @@ class RenderParagraph extends RenderBox ...@@ -266,11 +266,10 @@ class RenderParagraph extends RenderBox
/// Used by this paragraph's internal [TextPainter] to select a /// Used by this paragraph's internal [TextPainter] to select a
/// locale-specific font. /// locale-specific font.
/// ///
/// In some cases the same Unicode character may be rendered differently /// In some cases, the same Unicode character may be rendered differently
/// depending /// depending on the locale. For example, the '骨' character is rendered
/// on the locale. For example the '骨' character is rendered differently in /// differently in the Chinese and Japanese locales. In these cases, the
/// the Chinese and Japanese locales. In these cases the [locale] may be used /// [locale] may be used to select a locale-specific font.
/// to select a locale-specific font.
Locale? get locale => _textPainter.locale; Locale? get locale => _textPainter.locale;
/// The value may be null. /// The value may be null.
set locale(Locale? value) { set locale(Locale? value) {
...@@ -378,7 +377,7 @@ class RenderParagraph extends RenderBox ...@@ -378,7 +377,7 @@ class RenderParagraph extends RenderBox
case ui.PlaceholderAlignment.belowBaseline: { case ui.PlaceholderAlignment.belowBaseline: {
assert(RenderObject.debugCheckingIntrinsics, assert(RenderObject.debugCheckingIntrinsics,
'Intrinsics are not available for PlaceholderAlignment.baseline, ' 'Intrinsics are not available for PlaceholderAlignment.baseline, '
'PlaceholderAlignment.aboveBaseline, or PlaceholderAlignment.belowBaseline,'); 'PlaceholderAlignment.aboveBaseline, or PlaceholderAlignment.belowBaseline.');
return false; return false;
} }
case ui.PlaceholderAlignment.top: case ui.PlaceholderAlignment.top:
...@@ -432,7 +431,7 @@ class RenderParagraph extends RenderBox ...@@ -432,7 +431,7 @@ class RenderParagraph extends RenderBox
final List<PlaceholderDimensions> placeholderDimensions = List<PlaceholderDimensions>.filled(childCount, PlaceholderDimensions.empty, growable: false); final List<PlaceholderDimensions> placeholderDimensions = List<PlaceholderDimensions>.filled(childCount, PlaceholderDimensions.empty, growable: false);
int childIndex = 0; int childIndex = 0;
// Takes textScaleFactor into account because the content of the placeholder // Takes textScaleFactor into account because the content of the placeholder
// span will be scale up when it paints. // span will be scaled up when it paints.
width = width / textScaleFactor; width = width / textScaleFactor;
while (child != null) { while (child != null) {
final Size size = child.getDryLayout(BoxConstraints(maxWidth: width)); final Size size = child.getDryLayout(BoxConstraints(maxWidth: width));
...@@ -556,7 +555,7 @@ class RenderParagraph extends RenderBox ...@@ -556,7 +555,7 @@ class RenderParagraph extends RenderBox
// Leave height unconstrained, which will overflow if expanded past. // Leave height unconstrained, which will overflow if expanded past.
BoxConstraints boxConstraints = BoxConstraints(maxWidth: constraints.maxWidth); BoxConstraints boxConstraints = BoxConstraints(maxWidth: constraints.maxWidth);
// The content will be enlarged by textScaleFactor during painting phase. // The content will be enlarged by textScaleFactor during painting phase.
// We reduce constraint by textScaleFactor so that the content will fit // We reduce constraints by textScaleFactor, so that the content will fit
// into the box once it is enlarged. // into the box once it is enlarged.
boxConstraints = boxConstraints / textScaleFactor; boxConstraints = boxConstraints / textScaleFactor;
while (child != null) { while (child != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment