Bug 946502. Part 5: A ViewportFrame with a displayport on the root element needs to be an animated geometry root. r=mattwoodrow
authorRobert O'Callahan <robert@ocallahan.org>
Mon, 03 Feb 2014 13:32:01 +1300
changeset 182587 a3071397da31abd4cf68e345e9d65ed85793d7ca
parent 182579 0c1a52c468888b9a8be0ffd61b2973cdb9dd21e7
child 182588 4a6253a0bc33e9f4fb3663ff90d829aa34c88ea9
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs946502
milestone29.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 946502. Part 5: A ViewportFrame with a displayport on the root element needs to be an animated geometry root. r=mattwoodrow
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1310,16 +1310,21 @@ nsLayoutUtils::GetAnimatedGeometryRootFo
 {
   nsIFrame* f = aFrame;
   nsIFrame* stickyFrame = nullptr;
   while (f != aStopAtAncestor) {
     if (IsPopup(f))
       break;
     if (ActiveLayerTracker::IsOffsetOrMarginStyleAnimated(f))
       break;
+    if (!f->GetParent() && ViewportHasDisplayPort(f->PresContext())) {
+      // Viewport frames in a display port need to be animated geometry roots
+      // for background-attachment:fixed elements.
+      break;
+    }
     nsIFrame* parent = GetCrossDocParentFrame(f);
     if (!parent)
       break;
     nsIAtom* parentType = parent->GetType();
 #ifdef ANDROID
     // Treat the slider thumb as being as an active scrolled root
     // on mobile so that it can move without repainting.
     if (parentType == nsGkAtoms::sliderFrame)