From 5b8a3675fa6191dbc7d7d05799ddac8774eedfca Mon Sep 17 00:00:00 2001 From: "waterson%netscape.com" Date: Thu, 7 Jun 2001 02:09:38 +0000 Subject: [PATCH] Bug 42138. Remove ancient, unused {ib} code that causes the browser to hang. We don't need to descend into inlines looking for list-item frames anymore, because inlines cannot contain them: frame construction makes sure of that. r=rbs, sr=attinasi, a=dbaron. git-svn-id: svn://10.0.0.236/trunk@96603 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 24 ++++--------------- mozilla/layout/html/base/src/nsBlockFrame.cpp | 24 ++++--------------- 2 files changed, 10 insertions(+), 38 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 4faf30e9fb3..65ba98f289c 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -5879,13 +5879,13 @@ nsBlockFrame::RenumberListsFor(nsIPresContext* aPresContext, } // If the frame is a list-item and the frame implements our - // block frame API then get it's bullet and set the list item + // block frame API then get its bullet and set the list item // ordinal. const nsStyleDisplay* display; kid->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) display); if (NS_STYLE_DISPLAY_LIST_ITEM == display->mDisplay) { - // Make certain that the frame isa block-frame in case + // Make certain that the frame is a block frame in case // something foreign has crept in. nsBlockFrame* listItem; nsresult rv = kid->QueryInterface(kBlockFrameCID, (void**)&listItem); @@ -5901,7 +5901,7 @@ nsBlockFrame::RenumberListsFor(nsIPresContext* aPresContext, // XXX temporary? if the list-item has child list-items they // should be numbered too; especially since the list-item is - // itself (ASSUMED!) not to be a counter-reseter. + // itself (ASSUMED!) not to be a counter-resetter. PRBool meToo = RenumberListsInBlock(aPresContext, listItem, aOrdinal, aDepth + 1); if (meToo) { kidRenumberedABullet = PR_TRUE; @@ -5915,28 +5915,14 @@ nsBlockFrame::RenumberListsFor(nsIPresContext* aPresContext, // it. } else { - // If the display=block element ISA block-frame then go - // ahead and recurse into it as it might have child - // list-items. + // If the display=block element is a block frame then go ahead + // and recurse into it, as it might have child list-items. nsBlockFrame* kidBlock; nsresult rv = kid->QueryInterface(kBlockFrameCID, (void**) &kidBlock); if (NS_SUCCEEDED(rv)) { kidRenumberedABullet = RenumberListsInBlock(aPresContext, kidBlock, aOrdinal, aDepth + 1); } } - } else if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) { - // XXX temporary code: after ib work is done in frame construction - // code this can be removed. - - // If the display=inline element ISA nsInlineFrame then go - // ahead and recurse into it as it might have child - // list-items. - nsInlineFrame* kidInline; - nsresult rv = kid->QueryInterface(nsInlineFrame::kInlineFrameCID, - (void**) &kidInline); - if (NS_SUCCEEDED(rv)) { - kidRenumberedABullet = RenumberListsIn(aPresContext, kid, aOrdinal, aDepth + 1); - } } return kidRenumberedABullet; } diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 4faf30e9fb3..65ba98f289c 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -5879,13 +5879,13 @@ nsBlockFrame::RenumberListsFor(nsIPresContext* aPresContext, } // If the frame is a list-item and the frame implements our - // block frame API then get it's bullet and set the list item + // block frame API then get its bullet and set the list item // ordinal. const nsStyleDisplay* display; kid->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&) display); if (NS_STYLE_DISPLAY_LIST_ITEM == display->mDisplay) { - // Make certain that the frame isa block-frame in case + // Make certain that the frame is a block frame in case // something foreign has crept in. nsBlockFrame* listItem; nsresult rv = kid->QueryInterface(kBlockFrameCID, (void**)&listItem); @@ -5901,7 +5901,7 @@ nsBlockFrame::RenumberListsFor(nsIPresContext* aPresContext, // XXX temporary? if the list-item has child list-items they // should be numbered too; especially since the list-item is - // itself (ASSUMED!) not to be a counter-reseter. + // itself (ASSUMED!) not to be a counter-resetter. PRBool meToo = RenumberListsInBlock(aPresContext, listItem, aOrdinal, aDepth + 1); if (meToo) { kidRenumberedABullet = PR_TRUE; @@ -5915,28 +5915,14 @@ nsBlockFrame::RenumberListsFor(nsIPresContext* aPresContext, // it. } else { - // If the display=block element ISA block-frame then go - // ahead and recurse into it as it might have child - // list-items. + // If the display=block element is a block frame then go ahead + // and recurse into it, as it might have child list-items. nsBlockFrame* kidBlock; nsresult rv = kid->QueryInterface(kBlockFrameCID, (void**) &kidBlock); if (NS_SUCCEEDED(rv)) { kidRenumberedABullet = RenumberListsInBlock(aPresContext, kidBlock, aOrdinal, aDepth + 1); } } - } else if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) { - // XXX temporary code: after ib work is done in frame construction - // code this can be removed. - - // If the display=inline element ISA nsInlineFrame then go - // ahead and recurse into it as it might have child - // list-items. - nsInlineFrame* kidInline; - nsresult rv = kid->QueryInterface(nsInlineFrame::kInlineFrameCID, - (void**) &kidInline); - if (NS_SUCCEEDED(rv)) { - kidRenumberedABullet = RenumberListsIn(aPresContext, kid, aOrdinal, aDepth + 1); - } } return kidRenumberedABullet; }