From 171665617d546427cd1b48a4f90ee13f6f1e19b4 Mon Sep 17 00:00:00 2001 From: Daniel Holbert Date: Fri, 15 Aug 2014 20:22:09 -0700 Subject: [PATCH] Bug 1054563: Remove unnecessary nsresult return value from BuildScrollFrame, and de-indent it. r=tn --- layout/base/nsCSSFrameConstructor.cpp | 17 ++++++++--------- layout/base/nsCSSFrameConstructor.h | 2 +- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/layout/base/nsCSSFrameConstructor.cpp b/layout/base/nsCSSFrameConstructor.cpp index bdc9a4f18b89..33ab80c65761 100644 --- a/layout/base/nsCSSFrameConstructor.cpp +++ b/layout/base/nsCSSFrameConstructor.cpp @@ -4470,7 +4470,7 @@ nsCSSFrameConstructor::FinishBuildingScrollFrame(nsContainerFrame* aScrollFrame, * If this is not null, we'll just use it * @param aScrolledContentStyle the style that was resolved for the scrolled frame. (returned) */ -nsresult +void nsCSSFrameConstructor::BuildScrollFrame(nsFrameConstructorState& aState, nsIContent* aContent, nsStyleContext* aContentStyle, @@ -4478,16 +4478,15 @@ nsCSSFrameConstructor::BuildScrollFrame(nsFrameConstructorState& aState, nsContainerFrame* aParentFrame, nsContainerFrame*& aNewFrame) { - nsRefPtr scrolledContentStyle = - BeginBuildingScrollFrame(aState, aContent, aContentStyle, aParentFrame, - nsCSSAnonBoxes::scrolledContent, - false, aNewFrame); + nsRefPtr scrolledContentStyle = + BeginBuildingScrollFrame(aState, aContent, aContentStyle, aParentFrame, + nsCSSAnonBoxes::scrolledContent, + false, aNewFrame); - aScrolledFrame->SetStyleContextWithoutNotification(scrolledContentStyle); - InitAndRestoreFrame(aState, aContent, aNewFrame, aScrolledFrame); + aScrolledFrame->SetStyleContextWithoutNotification(scrolledContentStyle); + InitAndRestoreFrame(aState, aContent, aNewFrame, aScrolledFrame); - FinishBuildingScrollFrame(aNewFrame, aScrolledFrame); - return NS_OK; + FinishBuildingScrollFrame(aNewFrame, aScrolledFrame); } const nsCSSFrameConstructor::FrameConstructionData* diff --git a/layout/base/nsCSSFrameConstructor.h b/layout/base/nsCSSFrameConstructor.h index 0e1b0edc3486..1c2d42038372 100644 --- a/layout/base/nsCSSFrameConstructor.h +++ b/layout/base/nsCSSFrameConstructor.h @@ -1425,7 +1425,7 @@ private: // Calls BeginBuildingScrollFrame, InitAndRestoreFrame, and then FinishBuildingScrollFrame. // @param aNewFrame the created scrollframe --- output only // @param aParentFrame the geometric parent that the scrollframe will have. - nsresult + void BuildScrollFrame(nsFrameConstructorState& aState, nsIContent* aContent, nsStyleContext* aContentStyle,