nsIFrame::FinishAndStoreOverflow(nsRect* aOverflowArea, nsSize aNewSize) {      NS_ASSERTION(aNewSize.width == 0 || aNewSize.height == 0 || aOverflowArea->Contains(nsRect(nsPoint(0, 0), aNewSize)), "Computed overflow area must contain frame bounds");  PRBool hasOutline; nsRect outlineRect(ComputeOutlineRect(this, &hasOutline, *aOverflowArea));  if (hasOutline || (aOverflowArea->x < 0) || (aOverflowArea->y < 0) || (aOverflowArea->XMost() > aNewSize.width) || (aOverflowArea->YMost() > aNewSize.height)) { mState |= NS_FRAME_OUTSIDE_CHILDREN; nsRect* overflowArea = GetOverflowAreaProperty(PR_TRUE); NS_ASSERTION(overflowArea, "should have created rect"); *aOverflowArea = *overflowArea = outlineRect; } else { if (mState & NS_FRAME_OUTSIDE_CHILDREN) {  DeleteProperty(nsLayoutAtoms::overflowAreaProperty); } mState &= ~NS_FRAME_OUTSIDE_CHILDREN; } }
void FinishAndStoreOverflow(nsHTMLReflowMetrics* aMetrics) { FinishAndStoreOverflow(&aMetrics->mOverflowArea, nsSize(aMetrics->width, aMetrics->height)); }
nsIFrame::FinishAndStoreOverflow(nsRect* aOverflowArea, nsSize aNewSize){  // This is now called FinishAndStoreOverflow() instead of   // StoreOverflow() because frame-generic ways of adding overflow  // can happen here, e.g. CSS2 outline.  // If we find more things other than outline that need to be added,  // we should think about starting a new method like GetAdditionalOverflow()  NS_ASSERTION(aNewSize.width == 0 || aNewSize.height == 0 ||               aOverflowArea->Contains(nsRect(nsPoint(0, 0), aNewSize)),               "Computed overflow area must contain frame bounds");  PRBool hasOutline;  nsRect outlineRect(ComputeOutlineRect(this, &hasOutline, *aOverflowArea));  if (hasOutline ||      (aOverflowArea->x < 0) ||      (aOverflowArea->y < 0) ||      (aOverflowArea->XMost() > aNewSize.width) ||      (aOverflowArea->YMost() > aNewSize.height)) {    mState |= NS_FRAME_OUTSIDE_CHILDREN;    nsRect* overflowArea = GetOverflowAreaProperty(PR_TRUE);     NS_ASSERTION(overflowArea, "should have created rect");    *aOverflowArea = *overflowArea = outlineRect;  }   else {    if (mState & NS_FRAME_OUTSIDE_CHILDREN) {      // remove the previously stored overflow area       DeleteProperty(nsLayoutAtoms::overflowAreaProperty);    }    mState &= ~NS_FRAME_OUTSIDE_CHILDREN;  }   }