aCombinedArea.x = mRect.x + x0; aCombinedArea.y = mRect.y + y0; aCombinedArea.width = x1 - x0; aCombinedArea.height = y1 - y0;   if ((x0 < 0) || (y0 < 0) || (x1 > mRect.width) || (y1 > mRect.height)) { mState |= NS_FRAME_OUTSIDE_CHILDREN; } else { mState &= ~NS_FRAME_OUTSIDE_CHILDREN; }
nsInlineFrame::VerticalAlignFrames(nscoord aLineHeight,                                   nscoord aDistanceFromTopEdge){  if (HaveAnonymousBlock()) {    // This should be impossible - when we have an inline frame and it    // contains an anonymous block, none of the blocks children or the    // block itself will trigger a pass2 valign at this level.    NS_NOTREACHED("can't get here");    return NS_OK;  }  nsRect bbox;  nsIFrame* frame = mFrames.FirstChild();  while (nsnull != frame) {    const nsStyleText* textStyle;    frame->GetStyleData(eStyleStruct_Text, (const nsStyleStruct*&)textStyle);    nsStyleUnit verticalAlignUnit = textStyle->mVerticalAlign.GetUnit();    frame->GetRect(bbox);    if (eStyleUnit_Enumerated == verticalAlignUnit) {      PRUint8 verticalAlignEnum = textStyle->mVerticalAlign.GetIntValue();      switch (verticalAlignEnum) {      default:        break;      case NS_STYLE_VERTICAL_ALIGN_TOP:        // XXX what about the top margin?        // XXX relative positioning will need to be done *after* this        bbox.y = -aDistanceFromTopEdge;        frame->SetRect(bbox);        break;      case NS_STYLE_VERTICAL_ALIGN_BOTTOM:        // XXX what about the bottom margin?        // XXX relative positioning will need to be done *after* this        bbox.y = (aLineHeight - bbox.height) - aDistanceFromTopEdge;        frame->SetRect(bbox);        break;      }    }    // Perform pass2 vertical alignment for top/bottom aligned    // frames that are not our direct descendants.    nsIHTMLReflow* ihr;    nsresult rv = frame->QueryInterface(kIHTMLReflowIID, (void**)&ihr);    if (NS_SUCCEEDED(rv)) {      nscoord distanceFromTopEdge = aDistanceFromTopEdge + mRect.y;      ihr->VerticalAlignFrames(aLineHeight, distanceFromTopEdge);    }    frame->GetNextSibling(&frame);  }  return NS_OK;}