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();
while (nsnull != block) {  nsIFrame* frame = block->mLines ? block->mLines->mFirstChild : nsnull; while (nsnull != frame) {    const nsStyleDisplay* display; frame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) display); if (NS_STYLE_DISPLAY_LIST_ITEM == display->mDisplay) {   nsBlockFrame* listItem; if (NS_OK == frame->QueryInterface(kBlockFrameCID, (void**) &listItem)) { if (nsnull != listItem->mBullet) { listItem->mBullet->SetListItemOrdinal(aState); } }
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);}