This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ class CanvasParagraph implements EngineParagraph {
3030 /// The number of placeholders in this paragraph.
3131 final int placeholderCount;
3232
33+ // Defaulting to -1 for non-laid-out paragraphs like the native engine does.
3334 @override
3435 double width = - 1.0 ;
3536
Original file line number Diff line number Diff line change @@ -245,6 +245,7 @@ class DomParagraph implements EngineParagraph {
245245
246246 bool get _hasLineMetrics => _measurementResult? .lines != null ;
247247
248+ // Defaulting to -1 for non-laid-out paragraphs like the native engine does.
248249 @override
249250 double get width => _measurementResult? .width ?? - 1 ;
250251
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ void testMain() {
1717 WebExperiments .ensureInitialized ();
1818 });
1919
20+ // TODO(mdebbar): Add checks for the output of `toDomElement()` in all the
21+ // tests below.
22+
2023 test ('Builds a text-only canvas paragraph' , () {
2124 final EngineParagraphStyle style = EngineParagraphStyle (fontSize: 13.0 );
2225 final CanvasParagraphBuilder builder = CanvasParagraphBuilder (style);
You can’t perform that action at this time.
0 commit comments