@@ -396,11 +396,13 @@ class EngineParagraph implements ui.Paragraph {
396396
397397 ui.TextBox _getBoxForLine (EngineLineMetrics line, int start, int end) {
398398 final double widthBeforeBox = start <= line.startIndex
399- ? 0.0
400- : _measurementService.measureSubstringWidth (this , line.startIndex, start);
399+ ? 0.0
400+ : _measurementService.measureSubstringWidth (
401+ this , line.startIndex, start);
401402 final double widthAfterBox = end >= line.endIndexWithoutNewlines
402- ? 0.0
403- : _measurementService.measureSubstringWidth (this , end, line.endIndexWithoutNewlines);
403+ ? 0.0
404+ : _measurementService.measureSubstringWidth (
405+ this , end, line.endIndexWithoutNewlines);
404406
405407 final double top = line.lineNumber * _lineHeight;
406408
@@ -488,7 +490,8 @@ class EngineParagraph implements ui.Paragraph {
488490 int high = lineMetrics.endIndexWithoutNewlines;
489491 do {
490492 final int current = (low + high) ~ / 2 ;
491- final double width = instance.measureSubstringWidth (this , lineMetrics.startIndex, current);
493+ final double width =
494+ instance.measureSubstringWidth (this , lineMetrics.startIndex, current);
492495 if (width < dx) {
493496 low = current;
494497 } else if (width > dx) {
@@ -503,8 +506,10 @@ class EngineParagraph implements ui.Paragraph {
503506 return ui.TextPosition (offset: high, affinity: ui.TextAffinity .upstream);
504507 }
505508
506- final double lowWidth = instance.measureSubstringWidth (this , lineMetrics.startIndex, low);
507- final double highWidth = instance.measureSubstringWidth (this , lineMetrics.startIndex, high);
509+ final double lowWidth =
510+ instance.measureSubstringWidth (this , lineMetrics.startIndex, low);
511+ final double highWidth =
512+ instance.measureSubstringWidth (this , lineMetrics.startIndex, high);
508513
509514 if (dx - lowWidth < highWidth - dx) {
510515 // The offset is closer to the low index.
@@ -666,18 +671,17 @@ class EngineParagraphStyle implements ui.ParagraphStyle {
666671 @override
667672 int get hashCode {
668673 return ui.hashValues (
669- _textAlign,
670- _textDirection,
671- _fontWeight,
672- _fontStyle,
673- _maxLines,
674- _fontFamily,
675- _fontSize,
676- _height,
677- _textHeightBehavior,
678- _ellipsis,
679- _locale
680- );
674+ _textAlign,
675+ _textDirection,
676+ _fontWeight,
677+ _fontStyle,
678+ _maxLines,
679+ _fontFamily,
680+ _fontSize,
681+ _height,
682+ _textHeightBehavior,
683+ _ellipsis,
684+ _locale);
681685 }
682686
683687 @override
@@ -1500,7 +1504,12 @@ void _applyTextStyleToElement({
15001504 final String textDecoration =
15011505 _textDecorationToCssString (style._decoration, style._decorationStyle);
15021506 if (textDecoration != null ) {
1503- cssStyle.textDecoration = textDecoration;
1507+ if (browserEngine == BrowserEngine .webkit) {
1508+ domRenderer.setElementStyle (
1509+ element, '-webkit-text-decoration' , textDecoration);
1510+ } else {
1511+ cssStyle.textDecoration = textDecoration;
1512+ }
15041513 final ui.Color decorationColor = style._decorationColor;
15051514 if (decorationColor != null ) {
15061515 cssStyle.textDecorationColor = colorToCssString (decorationColor);
0 commit comments