                         
                         if (constraintsDetermineHeight(elementInfo))
                             rowHeight = Math.max(rowHeight, extY + layoutElement.getMinBoundsHeight());
+                        
+                        // bound with max height of row
+                        if (!isNaN(row.maxHeight))
+                            rowHeight = Math.min(rowHeight, row.maxHeight);
                         
                         row.setActualHeight(Math.ceil(rowHeight));
                     }

                    
                    if (numContentRows > 0)
                    {
                        rowHeight = availableHeight / numContentRows;
                        
                        for (j = 0; j < numContentRows; j++)
                        {
                            row = contentRows[j];
                            row.setActualHeight(Math.ceil(Math.max(row.height, rowHeight)));
                        }
                    }
                }

                        if (constraintsDetermineWidth(elementInfo))
                            colWidth = Math.max(colWidth, extX + layoutElement.getMinBoundsWidth());
                        
                        // bound with max width of column
                        if (!isNaN(col.maxWidth))
                            colWidth = Math.min(colWidth, col.maxWidth);
                        
                        col.setActualWidth(Math.ceil(colWidth));
                    }
                }
