Bug 1261698. Make ReparentFrameViewTo return void because it always returns NS_OK. r=mats
authorTimothy Nikkel <tnikkel@gmail.com>
Wed, 06 Apr 2016 01:26:42 -0500
changeset 291837 c2c09dd63bff3f0054c9500ed224001dfdfdead1
parent 291836 019d03cdbf2b615cff313ac01214f15ab7bc8e4c
child 291838 7e41f1773b7882306b5228c114f1f01bd7d9ea4f
push id74690
push usertnikkel@gmail.com
push dateWed, 06 Apr 2016 06:26:53 +0000
treeherdermozilla-inbound@c2c09dd63bff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs1261698
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1261698. Make ReparentFrameViewTo return void because it always returns NS_OK. r=mats
layout/generic/nsContainerFrame.cpp
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -367,27 +367,27 @@ nsContainerFrame::PeekOffsetCharacter(bo
   NS_ASSERTION (aOffset && *aOffset <= 1, "aOffset out of range");
   // Don't allow the caret to stay in an empty (leaf) container frame.
   return CONTINUE_EMPTY;
 }
 
 /////////////////////////////////////////////////////////////////////////////
 // Helper member functions
 
-static nsresult
+static void
 ReparentFrameViewTo(nsIFrame*       aFrame,
                     nsViewManager* aViewManager,
                     nsView*        aNewParentView,
                     nsView*        aOldParentView)
 {
   if (aFrame->HasView()) {
 #ifdef MOZ_XUL
     if (aFrame->GetType() == nsGkAtoms::menuPopupFrame) {
       // This view must be parented by the root view, don't reparent it.
-      return NS_OK;
+      return;
     }
 #endif
     nsView* view = aFrame->GetView();
     // Verify that the current parent view is what we think it is
     //nsView*  parentView;
     //NS_ASSERTION(parentView == aOldParentView, "unexpected parent view");
 
     aViewManager->RemoveChild(view);
@@ -402,18 +402,16 @@ ReparentFrameViewTo(nsIFrame*       aFra
       // a view
       nsFrameList::Enumerator childFrames(lists.CurrentList());
       for (; !childFrames.AtEnd(); childFrames.Next()) {
         ReparentFrameViewTo(childFrames.get(), aViewManager,
                             aNewParentView, aOldParentView);
       }
     }
   }
-
-  return NS_OK;
 }
 
 void
 nsContainerFrame::CreateViewForFrame(nsIFrame* aFrame,
                                      bool aForce)
 {
   if (aFrame->HasView()) {
     return;
@@ -535,18 +533,18 @@ nsContainerFrame::ReparentFrameView(nsIF
   nsView* oldParentView = aOldParentFrame->GetClosestView();
   nsView* newParentView = aNewParentFrame->GetClosestView();
   
   // See if the old parent frame and the new parent frame are in the
   // same view sub-hierarchy. If they are then we don't have to do
   // anything
   if (oldParentView != newParentView) {
     // They're not so we need to reparent any child views
-    return ReparentFrameViewTo(aChildFrame, oldParentView->GetViewManager(), newParentView,
-                               oldParentView);
+    ReparentFrameViewTo(aChildFrame, oldParentView->GetViewManager(), newParentView,
+                        oldParentView);
   }
 
   return NS_OK;
 }
 
 nsresult
 nsContainerFrame::ReparentFrameViewList(const nsFrameList& aChildFrameList,
                                         nsIFrame*          aOldParentFrame,