Skip to content

Commit 9e2ba63

Browse files
committed
Revert "Web PargraphStyle TextHeightBehavior integration (flutter-team-archive#16075)"
This reverts commit 86682a2.
1 parent b4fc4b5 commit 9e2ba63

2 files changed

Lines changed: 3 additions & 17 deletions

File tree

lib/ui/text.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,7 +1031,7 @@ class ParagraphStyle {
10311031
'maxLines: ${ _encoded[0] & 0x020 == 0x020 ? _encoded[5] : "unspecified"}, '
10321032
'textHeightBehavior: ${
10331033
_encoded[0] & 0x040 == 0x040 ?
1034-
TextHeightBehavior.fromEncoded(_encoded[6]).toString() : "unspecified"}, '
1034+
TextHeightBehavior.fromEncoded(_encoded[6]).toString() : "unspecified"}, '
10351035
'fontFamily: ${ _encoded[0] & 0x080 == 0x080 ? _fontFamily : "unspecified"}, '
10361036
'fontSize: ${ _encoded[0] & 0x100 == 0x100 ? _fontSize : "unspecified"}, '
10371037
'height: ${ _encoded[0] & 0x200 == 0x200 ? "${_height}x" : "unspecified"}, '

lib/web_ui/lib/src/engine/text/paragraph.dart

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -545,21 +545,8 @@ class EngineParagraphStyle implements ui.ParagraphStyle {
545545
}
546546

547547
@override
548-
int get hashCode {
549-
return ui.hashValues(
550-
_textAlign,
551-
_textDirection,
552-
_fontWeight,
553-
_fontStyle,
554-
_maxLines,
555-
_fontFamily,
556-
_fontSize,
557-
_height,
558-
_textHeightBehavior,
559-
_ellipsis,
560-
_locale
561-
);
562-
}
548+
int get hashCode =>
549+
ui.hashValues(_fontFamily, _fontSize, _height, _ellipsis, _locale);
563550

564551
@override
565552
String toString() {
@@ -570,7 +557,6 @@ class EngineParagraphStyle implements ui.ParagraphStyle {
570557
'fontWeight: ${_fontWeight ?? "unspecified"}, '
571558
'fontStyle: ${_fontStyle ?? "unspecified"}, '
572559
'maxLines: ${_maxLines ?? "unspecified"}, '
573-
'textHeightBehavior: ${_textHeightBehavior ?? "unspecified"}, '
574560
'fontFamily: ${_fontFamily ?? "unspecified"}, '
575561
'fontSize: ${_fontSize != null ? _fontSize.toStringAsFixed(1) : "unspecified"}, '
576562
'height: ${_height != null ? "${_height.toStringAsFixed(1)}x" : "unspecified"}, '

0 commit comments

Comments
 (0)