Bug 1194851 - Remove the second parameter of IsFixedPosFrameInDisplayPort(). r=kats draft
authorBotond Ballo <botond@mozilla.com>
Wed, 16 Dec 2015 17:58:52 -0500
changeset 315884 7cb3e8f852c4192bf5a86da5d179be3c9c4f0932
parent 315883 b4f5de83f3043b4aad92f8ac355a203f11bbe45e
child 512098 9dd71a9ba3dd5ce1eebed24d2299d8fe71840e8d
push id8477
push userbballo@mozilla.com
push dateWed, 16 Dec 2015 23:36:54 +0000
reviewerskats
bugs1194851
milestone45.0a1
Bug 1194851 - Remove the second parameter of IsFixedPosFrameInDisplayPort(). r=kats No one was using it.
layout/base/nsLayoutUtils.cpp
layout/base/nsLayoutUtils.h
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1819,27 +1819,27 @@ nsLayoutUtils::ViewportHasDisplayPort(ns
 {
   nsIFrame* rootScrollFrame =
     aPresContext->PresShell()->GetRootScrollFrame();
   return rootScrollFrame &&
     nsLayoutUtils::GetDisplayPort(rootScrollFrame->GetContent(), aDisplayPort);
 }
 
 bool
-nsLayoutUtils::IsFixedPosFrameInDisplayPort(const nsIFrame* aFrame, nsRect* aDisplayPort)
+nsLayoutUtils::IsFixedPosFrameInDisplayPort(const nsIFrame* aFrame)
 {
   // Fixed-pos frames are parented by the viewport frame or the page content frame.
   // We'll assume that printing/print preview don't have displayports for their
   // pages!
   nsIFrame* parent = aFrame->GetParent();
   if (!parent || parent->GetParent() ||
       aFrame->StyleDisplay()->mPosition != NS_STYLE_POSITION_FIXED) {
     return false;
   }
-  return ViewportHasDisplayPort(aFrame->PresContext(), aDisplayPort);
+  return ViewportHasDisplayPort(aFrame->PresContext());
 }
 
 NS_DECLARE_FRAME_PROPERTY(ScrollbarThumbLayerized, nullptr)
 
 /* static */ void
 nsLayoutUtils::SetScrollbarThumbLayerization(nsIFrame* aThumbFrame, bool aLayerize)
 {
   aThumbFrame->Properties().Set(ScrollbarThumbLayerized(),
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -532,18 +532,17 @@ public:
                                      nsRect* aDisplayPort = nullptr);
 
   /**
    * Return true if aFrame is a fixed-pos frame and is a child of a viewport
    * which has a displayport. These frames get special treatment from the compositor.
    * aDisplayPort, if non-null, is set to the display port rectangle (relative to
    * the viewport).
    */
-  static bool IsFixedPosFrameInDisplayPort(const nsIFrame* aFrame,
-                                           nsRect* aDisplayPort = nullptr);
+  static bool IsFixedPosFrameInDisplayPort(const nsIFrame* aFrame);
 
   /**
    * Store whether aThumbFrame wants its own layer. This sets a property on
    * the frame.
    */
   static void SetScrollbarThumbLayerization(nsIFrame* aThumbFrame, bool aLayerize);
 
   /**