-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemse: web_htmlHTML rendering backend for WebHTML rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.20Found to occur in 3.20Found to occur in 3.20has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: solvedIssue is closed as solvedIssue is closed as solvedteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team
Description
Repro steps:
test('empty paragraph is empty', () {
final TextPainter painter = TextPainter(
textDirection: TextDirection.ltr,
text: const TextSpan(),
)..layout();
expect(painter.computeLineMetrics(), isEmpty);
});Run flutter test test/painting/text_painter_test.dart --platform=chrome --web-renderer=html --plain-name='empty paragraph is empty'
it fails with error message:
Expected: empty
Actual: [
EngineLineMetrics:LineMetrics(hardBreak: true, ascent: 10, descent: 4, unscaledAscent: 10, height: 14, width: 0, left: 0, baseline: 10, lineNumber: 0)
]
The behavior is reasonable but it's inconsistent with what SkParagraph reports.
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemse: web_htmlHTML rendering backend for WebHTML rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.20Found to occur in 3.20Found to occur in 3.20has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyWeb applications specificallyr: solvedIssue is closed as solvedIssue is closed as solvedteam-webOwned by Web platform teamOwned by Web platform teamtriaged-webTriaged by Web platform teamTriaged by Web platform team