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 817026 f6f94dfc0ecd6500a519bb8cd2db1089d4ea28dd
parent 816970 7874c9181c3cd4fd9f321fdf48f997a528dbce94
child 817027 0f78a428db171a50183c0a8cc98ec453d68432b7
push id115934
push userbmo:kmadan@mozilla.com
push dateWed, 11 Jul 2018 21:10:29 +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)
 {