Skip to content

Commit f9f3d31

Browse files
committed
Clean up PR
1 parent 781ec50 commit f9f3d31

File tree

5 files changed

+5
-28
lines changed

5 files changed

+5
-28
lines changed
-3.95 KB
Binary file not shown.
-4.03 KB
Binary file not shown.

packages/core/lib/src/widgets/css_sizing.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ class _RenderCssSizing extends RenderProxyBox {
287287
minWidth: stableChildSize?.width ?? preferredWidth ?? minWidth,
288288
);
289289

290-
// after everything... if the incoming are tight then we must follow it
290+
// after everything... if the incoming is tight then we must follow it
291291
cc = c.hasTightWidth ? cc.tighten(width: c.maxWidth) : cc;
292292
cc = c.hasTightHeight ? cc.tighten(height: c.maxHeight) : cc;
293293

packages/core/lib/src/widgets/html_table.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:flutter/rendering.dart';
44
import 'package:flutter/widgets.dart';
55
import 'package:logging/logging.dart';
66

7-
import 'css_sizing.dart' show CssSizingHint;
7+
import 'css_sizing.dart';
88

99
/// A TABLE widget.
1010
class HtmlTable extends MultiChildRenderObjectWidget {
@@ -332,12 +332,15 @@ class _TableRenderLayouter {
332332
final columnGapsSum = (columnCount + 1) * tro.columnGap;
333333
final gapsAndPaddings = tro.paddingLeft + columnGapsSum + tro.paddingRight;
334334

335+
// calculate the available width if possible
336+
// this may be null if table is inside a horizontal scroll view
335337
double? availableWidth;
336338
final maxWidth = tro._maxWidth ?? constraints.maxWidth;
337339
if (maxWidth.isFinite && maxWidth > 0) {
338340
availableWidth = maxWidth - gapsAndPaddings;
339341
}
340342

343+
// calculate the required width if specified (null by default)
341344
double? requiredWidth;
342345
final minWidth = tro._minWidth ?? constraints.minWidth;
343346
if (minWidth.isFinite && minWidth > 0) {

packages/core/test/tag_table_test.dart

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,32 +1201,6 @@ Below''',
12011201
</table>
12021202
</td>
12031203
</tr>
1204-
</table>''',
1205-
'width_in_percent_100_nested_with_gaps': '''
1206-
<table border="1">
1207-
<tr><td>Foo foo foo</td></tr>
1208-
<tr>
1209-
<td>
1210-
<table border="1">
1211-
<tr>
1212-
<td style="width: 100%">Foo</td>
1213-
</tr>
1214-
</table>
1215-
</td>
1216-
</tr>
1217-
</table>''',
1218-
'width_in_percent_100_nested_stretch': '''
1219-
<table border="1">
1220-
<tr><td>Foo foo foo</td></tr>
1221-
<tr>
1222-
<td>
1223-
<table border="1" style="width: 100%">
1224-
<tr>
1225-
<td style="width: 100%">Foo</td>
1226-
</tr>
1227-
</table>
1228-
</td>
1229-
</tr>
12301204
</table>''',
12311205
'width_in_px': '''
12321206
<table border="1">

0 commit comments

Comments
 (0)