Bug 1465616 - Don't use SPC-SPS to layout fixed position elements. r=mstange draft
authorKashav Madan <kmadan@mozilla.com>
Wed, 04 Jul 2018 15:16:17 -0400
changeset 821025 9418aed138d11aaab9ff9fd2105648a536bda125
parent 821024 1f825b24db51f58ab06d74a461ad88b8234a70e8
child 821026 d90f7b5dd3f7761d26cdfc4fbfccec864ade33a5
push id116994
push userbmo:kmadan@mozilla.com
push dateFri, 20 Jul 2018 19:32:49 +0000
reviewersmstange
bugs1465616
milestone63.0a1
Bug 1465616 - Don't use SPC-SPS to layout fixed position elements. r=mstange MozReview-Commit-ID: 5D4ErVFx8Bm
layout/generic/ViewportFrame.cpp
--- a/layout/generic/ViewportFrame.cpp
+++ b/layout/generic/ViewportFrame.cpp
@@ -276,25 +276,17 @@ ViewportFrame::AdjustReflowInputAsContai
 #endif
     AdjustReflowInputForScrollbars(aReflowInput);
 
   NS_ASSERTION(GetAbsoluteContainingBlock()->GetChildList().IsEmpty() ||
                (offset.x == 0 && offset.y == 0),
                "We don't handle correct positioning of fixed frames with "
                "scrollbars in odd positions");
 
-  // If a scroll position clamping scroll-port size has been set, layout
-  // fixed position elements to this size instead of the computed size.
-  nsRect rect(0, 0, aReflowInput->ComputedWidth(), aReflowInput->ComputedHeight());
-  nsIPresShell* ps = PresShell();
-  if (ps->IsScrollPositionClampingScrollPortSizeSet()) {
-    rect.SizeTo(ps->GetScrollPositionClampingScrollPortSize());
-  }
-
-  return rect;
+  return nsRect(0, 0, aReflowInput->ComputedWidth(), aReflowInput->ComputedHeight());
 }
 
 void
 ViewportFrame::Reflow(nsPresContext*           aPresContext,
                       ReflowOutput&     aDesiredSize,
                       const ReflowInput& aReflowInput,
                       nsReflowStatus&          aStatus)
 {