From 5ce034230b59b13a5264e1bc1835036af53d9660 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 28 Jan 2015 13:28:28 -0500 Subject: [PATCH] Bug 1124452 - Make it work without containerless-root, too. r=tn --HG-- extra : rebase_source : 487e678ef5fc1592326a72f279e7e7f9f32a3a71 --- layout/base/nsDisplayList.cpp | 11 ++++------- layout/base/nsDisplayList.h | 1 - layout/generic/nsGfxScrollFrame.cpp | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/layout/base/nsDisplayList.cpp b/layout/base/nsDisplayList.cpp index 9d3948e87263..3e66c97b5d5f 100644 --- a/layout/base/nsDisplayList.cpp +++ b/layout/base/nsDisplayList.cpp @@ -697,7 +697,6 @@ nsDisplayScrollLayer::ComputeFrameMetrics(nsIFrame* aForFrame, Layer* aLayer, ViewID aScrollParentId, const nsRect& aViewport, - bool aForceNullScrollId, bool aIsRoot, const ContainerLayerParameters& aContainerParameters) { @@ -711,9 +710,7 @@ nsDisplayScrollLayer::ComputeFrameMetrics(nsIFrame* aForFrame, ViewID scrollId = FrameMetrics::NULL_SCROLL_ID; nsIContent* content = aScrollFrame ? aScrollFrame->GetContent() : nullptr; if (content) { - if (!aForceNullScrollId) { - scrollId = nsLayoutUtils::FindOrCreateIDFor(content); - } + scrollId = nsLayoutUtils::FindOrCreateIDFor(content); nsRect dp; if (nsLayoutUtils::GetDisplayPort(content, &dp)) { metrics.SetDisplayPort(CSSRect::FromAppUnits(dp)); @@ -1623,7 +1620,7 @@ already_AddRefed nsDisplayList::PaintRoot(nsDisplayListBuilder* aB nsDisplayScrollLayer::ComputeFrameMetrics(frame, rootScrollFrame, aBuilder->FindReferenceFrameFor(frame), root, FrameMetrics::NULL_SCROLL_ID, viewport, - !isRoot, isRoot, containerParameters)); + isRoot, containerParameters)); } // NS_WARNING is debug-only, so don't even bother checking the conditions in @@ -4088,7 +4085,7 @@ nsDisplaySubDocument::ComputeFrameMetrics(Layer* aLayer, return MakeUnique( nsDisplayScrollLayer::ComputeFrameMetrics(mFrame, rootScrollFrame, ReferenceFrame(), aLayer, mScrollParentId, viewport, - false, isRootContentDocument, params)); + isRootContentDocument, params)); } static bool @@ -4422,7 +4419,7 @@ nsDisplayScrollLayer::ComputeFrameMetrics(Layer* aLayer, return UniquePtr(new FrameMetrics( ComputeFrameMetrics(mScrolledFrame, mScrollFrame, ReferenceFrame(), aLayer, - mScrollParentId, viewport, false, false, params))); + mScrollParentId, viewport, false, params))); } bool diff --git a/layout/base/nsDisplayList.h b/layout/base/nsDisplayList.h index 446847a42f8b..c8a0d7cec431 100644 --- a/layout/base/nsDisplayList.h +++ b/layout/base/nsDisplayList.h @@ -3171,7 +3171,6 @@ public: Layer* aLayer, ViewID aScrollParentId, const nsRect& aViewport, - bool aForceNullScrollId, bool aIsRoot, const ContainerLayerParameters& aContainerParameters); diff --git a/layout/generic/nsGfxScrollFrame.cpp b/layout/generic/nsGfxScrollFrame.cpp index 2508895243b3..ec73fe0eadf4 100644 --- a/layout/generic/nsGfxScrollFrame.cpp +++ b/layout/generic/nsGfxScrollFrame.cpp @@ -3179,7 +3179,7 @@ ScrollFrameHelper::ComputeFrameMetrics(Layer* aLayer, *aOutput->AppendElement() = nsDisplayScrollLayer::ComputeFrameMetrics(mScrolledFrame, mOuter, aContainerReferenceFrame, aLayer, mScrollParentID, - scrollport, false, isRoot, aParameters); + scrollport, isRoot, aParameters); } bool