Bug 1348665 part 3 - Remove the aFlags param to SyncFrameViewProperties because all callers pass zero. r=tnikkel draft
authorMats Palmgren <mats@mozilla.com>
Tue, 21 Mar 2017 00:05:04 +0100
changeset 501759 dae805bbae6f261f55e82f98d9dc760f2207aa8d
parent 501758 61d3e2268df4db2e81193aeab81c679afeb189ce
child 501760 1e474b43de0fa2027f735fbfd0129244e439f2d3
push id50115
push usermpalmgren@mozilla.com
push dateMon, 20 Mar 2017 23:15:02 +0000
reviewerstnikkel
bugs1348665
milestone55.0a1
Bug 1348665 part 3 - Remove the aFlags param to SyncFrameViewProperties because all callers pass zero. r=tnikkel MozReview-Commit-ID: 7zohl3bOsO1
layout/generic/nsFrame.cpp
layout/generic/nsIFrame.h
layout/xul/nsMenuPopupFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1016,35 +1016,33 @@ nsIFrame::ReparentFrameViewTo(nsIFrame* 
     }
   }
 }
 
 void
 nsIFrame::SyncFrameViewProperties(nsPresContext*  aPresContext,
                                  nsIFrame*        aFrame,
                                  nsStyleContext*  aStyleContext,
-                                 nsView*          aView,
-                                 uint32_t         aFlags)
+                                 nsView*          aView)
 {
   NS_ASSERTION(!aStyleContext || aFrame->StyleContext() == aStyleContext,
                "Wrong style context for frame?");
 
   if (!aView) {
     return;
   }
 
   nsViewManager* vm = aView->GetViewManager();
 
   if (nullptr == aStyleContext) {
     aStyleContext = aFrame->StyleContext();
   }
 
   // Make sure visibility is correct. This only affects nsSubdocumentFrame.
-  if (0 == (aFlags & NS_FRAME_NO_VISIBILITY) &&
-      !aFrame->SupportsVisibilityHidden()) {
+  if (!aFrame->SupportsVisibilityHidden()) {
     // See if the view should be hidden or visible
     vm->SetViewVisibility(aView,
         aStyleContext->StyleVisibility()->IsVisible()
             ? nsViewVisibility_kShow : nsViewVisibility_kHide);
   }
 
   int32_t zIndex = 0;
   bool    autoZIndex = false;
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -2482,18 +2482,17 @@ public:
   // - visibility
   // - clip
   // Call this when one of these styles changes or when the view has just
   // been created.
   // @param aStyleContext can be null, in which case the frame's style context is used
   static void SyncFrameViewProperties(nsPresContext*  aPresContext,
                                       nsIFrame*        aFrame,
                                       nsStyleContext*  aStyleContext,
-                                      nsView*         aView,
-                                      uint32_t         aFlags = 0);
+                                      nsView*         aView);
 
   /**
    * Get the offset between the coordinate systems of |this| and aOther.
    * Adding the return value to a point in the coordinate system of |this|
    * will transform the point to the coordinate system of aOther.
    *
    * aOther must be non-null.
    *
--- a/layout/xul/nsMenuPopupFrame.cpp
+++ b/layout/xul/nsMenuPopupFrame.cpp
@@ -525,17 +525,17 @@ nsMenuPopupFrame::LayoutPopup(nsBoxLayou
     rect.x = rect.y = 0;
     viewManager->ResizeView(view, rect);
 
     if (mPopupState == ePopupOpening) {
       mPopupState = ePopupVisible;
     }
 
     viewManager->SetViewVisibility(view, nsViewVisibility_kShow);
-    nsContainerFrame::SyncFrameViewProperties(pc, this, nullptr, view, 0);
+    nsContainerFrame::SyncFrameViewProperties(pc, this, nullptr, view);
   }
 
   // finally, if the popup just opened, send a popupshown event
   if (mIsOpenChanged) {
     mIsOpenChanged = false;
 
     // Make sure the current selection in a menulist is visible.
     if (IsMenuList() && mCurrentMenu) {