                         extY -= elementInfo.top;
                     
                     if (elementInfo.baselineBoundary)
+                    {
                         topIndex = elementInfo.baselineIndex;
+                        
+                        // add baseline offset.
+                        extY += Number(rowBaselines[topIndex][0]); 
+                            
+                        // add maxAscent. maxAscent is 0 if not specified on the row.
+                        if (rowMaxAscents)
+                            extY += rowMaxAscents[topIndex];
+                    }
                     else
+                    {
                         topIndex = 0;
+                    }
                 }
                 
                 maxExtent = extY + preferredHeight;

        
        // Vertical Position
        if (!isNaN(baseline))
            elementY = baselineHolder + Math.round(baseline - layoutElement.baselinePosition);
        else if (!isNaN(top))
            elementY = topHolder + top;
        else if (!isNaN(bottom))

                    message = ResourceManager.getInstance().getString(
                        "layout", "rowNotFound", [ baselineBoundary ]);
                    throw new ConstraintError(message);
                }
                
                // when using maxAscent, calculate maximum baselinePosition for this row.
                var bIndex:int = elementInfo.baselineIndex;
                var numRows:Number = _constraintRows.length;
                
                if (rowBaselines[bIndex][1])
                {
                    // maxAscents will all default to 0.
                    if (!rowMaxAscents)
                        rowMaxAscents = new Vector.<Number>(numRows, true);

                    rowMaxAscents[bIndex] = Math.max(rowMaxAscents[bIndex], layoutElement.baselinePosition);
                }
            }
        }
