if (!FrameStartsCounterScope(this)) {   return;
PRInt32 ordinal = 1; nsIHTMLContent* hc; if (NS_OK == mContent->QueryInterface(kIHTMLContentIID, (void**) &hc)) { nsHTMLValue value; if (NS_CONTENT_ATTR_HAS_VALUE == hc->GetAttribute(nsHTMLAtoms::start, value)) { if (eHTMLUnit_Integer == value.GetUnit()) { ordinal = value.GetIntValue(); if (ordinal <= 0) { ordinal = 1; } } } NS_RELEASE(hc); } aState.mNextListOrdinal = ordinal;   nsBlockFrame* block = this; while (nsnull != block->mPrevInFlow) { block = (nsBlockFrame*) block->mPrevInFlow;
nsBlockFrame::RenumberLists(nsIPresContext* aPresContext){  if (!FrameStartsCounterScope(this)) {    // If this frame doesn't start a counter scope then we don't need    // to renumber child list items.    return;  }  // Setup initial list ordinal value  // XXX Map html's start property to counter-reset style  PRInt32 ordinal = 1;  nsCOMPtr<nsIHTMLContent> hc(do_QueryInterface(mContent));  if (hc) {    nsHTMLValue value;    if (NS_CONTENT_ATTR_HAS_VALUE ==        hc->GetHTMLAttribute(nsHTMLAtoms::start, value)) {      if (eHTMLUnit_Integer == value.GetUnit()) {        ordinal = value.GetIntValue();      }    }  }  // Get to first-in-flow  nsBlockFrame* block = (nsBlockFrame*) GetFirstInFlow();  RenumberListsInBlock(aPresContext, block, &ordinal, 0);}