From 5f9dc2135345d180e78bd80b1f091d3f4075007b Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Wed, 28 Mar 2012 12:43:15 -0700 Subject: [PATCH] Bug 740067: Make nsCSSFrameConstructor::CreateNeededTablePseudos return void. r=bz --- layout/base/nsCSSFrameConstructor.cpp | 13 +++++-------- layout/base/nsCSSFrameConstructor.h | 6 +++--- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index 845856f3259..d515946fd4a 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -9237,7 +9237,7 @@ nsCSSFrameConstructor::sPseudoParentData[eParentTypeCount] = { * around everything else. At the end of this method, aItems is guaranteed to * contain only items for frames that can be direct kids of aParentFrame. */ -nsresult +void nsCSSFrameConstructor::CreateNeededTablePseudos(nsFrameConstructorState& aState, FrameConstructionItemList& aItems, nsIFrame* aParentFrame) @@ -9245,14 +9245,14 @@ nsCSSFrameConstructor::CreateNeededTablePseudos(nsFrameConstructorState& aState, ParentType ourParentType = GetParentType(aParentFrame); if (aItems.AllWantParentType(ourParentType)) { // Nothing to do here - return NS_OK; + return; } FCItemIterator iter(aItems); do { if (iter.SkipItemsWantingParentType(ourParentType)) { // Nothing else to do here; we're finished - return NS_OK; + return; } // Now we're pointing to the first child that wants a different parent @@ -9434,8 +9434,6 @@ nsCSSFrameConstructor::CreateNeededTablePseudos(nsFrameConstructorState& aState, // loop and see whether we need to skip it or wrap it in something // different. } while (!iter.IsDone()); - - return NS_OK; } inline nsresult @@ -9446,8 +9444,7 @@ nsCSSFrameConstructor::ConstructFramesFromItemList(nsFrameConstructorState& aSta { aItems.SetTriedConstructingFrames(); - nsresult rv = CreateNeededTablePseudos(aState, aItems, aParentFrame); - NS_ENSURE_SUCCESS(rv, rv); + CreateNeededTablePseudos(aState, aItems, aParentFrame); #ifdef DEBUG for (FCItemIterator iter(aItems); !iter.IsDone(); iter.Next()) { @@ -9457,7 +9454,7 @@ nsCSSFrameConstructor::ConstructFramesFromItemList(nsFrameConstructorState& aSta #endif for (FCItemIterator iter(aItems); !iter.IsDone(); iter.Next()) { - rv = ConstructFramesFromItem(aState, iter, aParentFrame, aFrameItems); + nsresult rv = ConstructFramesFromItem(aState, iter, aParentFrame, aFrameItems); NS_ENSURE_SUCCESS(rv, rv); } diff --git a/layout/base/nsCSSFrameConstructor.h b/layout/base/nsCSSFrameConstructor.h index 6c6d2b2ceaa..6d0f4fba0a8 100644 --- a/layout/base/nsCSSFrameConstructor.h +++ b/layout/base/nsCSSFrameConstructor.h @@ -1139,9 +1139,9 @@ private: * @param aItems the child frame construction items before pseudo creation * @param aParentFrame the parent frame we're creating pseudos for */ - inline nsresult CreateNeededTablePseudos(nsFrameConstructorState& aState, - FrameConstructionItemList& aItems, - nsIFrame* aParentFrame); + inline void CreateNeededTablePseudos(nsFrameConstructorState& aState, + FrameConstructionItemList& aItems, + nsIFrame* aParentFrame); /** * Function to adjust aParentFrame to deal with captions.