Imported Upstream version 5.20.0.180

Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-02-04 20:11:37 +00:00
parent 0e2d47d1c8
commit 0510252385
3360 changed files with 83827 additions and 39243 deletions

View File

@ -483,7 +483,7 @@ namespace System.Windows.Forms.Layout
CalculateColumnWidths (settings, actual_positions, max_colspan, settings.ColumnStyles, auto_size, column_widths, false);
// Calculate available width
int available_width = size.Width - (border_width * (columns + 1));
int available_width = size.Width < Int16.MaxValue ? size.Width - (border_width * (columns + 1)) : 0;
foreach (int width in column_widths)
available_width -= width;
@ -516,7 +516,7 @@ namespace System.Windows.Forms.Layout
CalculateRowHeights (settings, actual_positions, max_rowspan, settings.RowStyles, auto_size, column_widths, row_heights);
// Calculate available height
int available_height = size.Height - (border_width * (rows + 1));
int available_height = size.Height < Int16.MaxValue ? size.Height - (border_width * (rows + 1)) : 0;
foreach (int height in row_heights)
available_height -= height;