Bug 1124452 - Make it work without containerless-root, too. r=tn

--HG--
extra : rebase_source : 487e678ef5fc1592326a72f279e7e7f9f32a3a71
This commit is contained in:
Kartikaya Gupta 2015-01-28 13:28:28 -05:00
Родитель 88c75539b0
Коммит 5ce034230b
3 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -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<LayerManager> 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<FrameMetrics>(
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<FrameMetrics>(new FrameMetrics(
ComputeFrameMetrics(mScrolledFrame, mScrollFrame, ReferenceFrame(), aLayer,
mScrollParentId, viewport, false, false, params)));
mScrollParentId, viewport, false, params)));
}
bool

Просмотреть файл

@ -3171,7 +3171,6 @@ public:
Layer* aLayer,
ViewID aScrollParentId,
const nsRect& aViewport,
bool aForceNullScrollId,
bool aIsRoot,
const ContainerLayerParameters& aContainerParameters);

Просмотреть файл

@ -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