Bug 980247 - Use offsets from GetNormalPosition() when updating continuations of position:sticky elements instead of assuming that they're all currently offset by the same amount. r=dbaron, r=corey
authorAbel Lin <alin@mozilla.com>
Wed, 26 Mar 2014 14:45:17 -0400
changeset 175552 becd60bbd3834b7b9eef152db27e816bdc63e4ce
parent 175551 4ede230e093817914194f52455e41a9b38b9406f
child 175553 52755193f6927b42f52719ef06dcaab77f72bff3
push id26492
push userryanvm@gmail.com
push dateThu, 27 Mar 2014 00:57:51 +0000
treeherdermozilla-central@441f5fd256e2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron, corey
bugs980247
milestone31.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 980247 - Use offsets from GetNormalPosition() when updating continuations of position:sticky elements instead of assuming that they're all currently offset by the same amount. r=dbaron, r=corey
layout/generic/StickyScrollContainer.cpp
--- a/layout/generic/StickyScrollContainer.cpp
+++ b/layout/generic/StickyScrollContainer.cpp
@@ -324,22 +324,22 @@ StickyScrollContainer::GetScrollRanges(n
   }
 }
 
 void
 StickyScrollContainer::PositionContinuations(nsIFrame* aFrame)
 {
   NS_ASSERTION(nsLayoutUtils::IsFirstContinuationOrIBSplitSibling(aFrame),
                "Should be starting from the first continuation");
-  nsPoint translation = ComputePosition(aFrame) - aFrame->GetPosition();
+  nsPoint translation = ComputePosition(aFrame) - aFrame->GetNormalPosition();
 
   // Move all continuation frames by the same amount.
   for (nsIFrame* cont = aFrame; cont;
        cont = nsLayoutUtils::GetNextContinuationOrIBSplitSibling(cont)) {
-    cont->SetPosition(cont->GetPosition() + translation);
+    cont->SetPosition(cont->GetNormalPosition() + translation);
   }
 }
 
 void
 StickyScrollContainer::UpdatePositions(nsPoint aScrollPosition,
                                        nsIFrame* aSubtreeRoot)
 {
 #ifdef DEBUG