Bug 1369910 - Simplify AddingOwnLayer() call sites in ProcessDisplayItems(). r=mstange

MozReview-Commit-ID: 3kH48WPAOv7

--HG--
extra : rebase_source : 8bb31b37762f26383de3a1353aa8b70be243130a
This commit is contained in:
Botond Ballo 2017-06-09 16:26:47 -04:00
Родитель 24c1e8a9e2
Коммит 7d5f2e43a8
2 изменённых файлов: 20 добавлений и 9 удалений

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

@ -4216,18 +4216,22 @@ ContainerState::ProcessDisplayItems(nsDisplayList* aList)
mPaintedLayerDataTree.AddingOwnLayer(clipAGR,
&scrolledClipRect,
uniformColorPtr);
} else if ((*animatedGeometryRoot == item->Frame() &&
*animatedGeometryRoot != mBuilder->RootReferenceFrame()) ||
(IsScrollThumbLayer(item) && mManager->IsWidgetLayerManager())) {
// This is the case for scrollbar thumbs, for example. In that case the
// clip we care about is the overflow:hidden clip on the scrollbar.
} else if (IsScrollThumbLayer(item) && mManager->IsWidgetLayerManager()) {
// For scrollbar thumbs, the clip we care about is the clip added by the
// slider frame.
mPaintedLayerDataTree.AddingOwnLayer(animatedGeometryRoot->mParentAGR,
clipPtr,
uniformColorPtr);
} else if (prerenderedTransform) {
mPaintedLayerDataTree.AddingOwnLayer(animatedGeometryRoot,
clipPtr,
uniformColorPtr);
} else if (prerenderedTransform && mManager->IsWidgetLayerManager()) {
if (animatedGeometryRoot->mParentAGR) {
mPaintedLayerDataTree.AddingOwnLayer(animatedGeometryRoot->mParentAGR,
clipPtr,
uniformColorPtr);
} else {
mPaintedLayerDataTree.AddingOwnLayer(animatedGeometryRoot,
nullptr,
uniformColorPtr);
}
} else {
// Using itemVisibleRect here isn't perfect. itemVisibleRect can be
// larger or smaller than the potential bounds of item's contents in

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

@ -6187,6 +6187,13 @@ nsDisplaySubDocument::nsDisplaySubDocument(nsDisplayListBuilder* aBuilder,
mForceDispatchToContentRegion =
aBuilder->IsBuildingLayerEventRegions() &&
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(aFrame->PresContext()->PresShell());
// The SubDocument display item is conceptually outside the viewport frame,
// so in cases where the viewport frame is an AGR, the SubDocument's AGR
// should be not the viewport frame itself, but its parent AGR.
if (*mAnimatedGeometryRoot == mFrame && mAnimatedGeometryRoot->mParentAGR) {
mAnimatedGeometryRoot = mAnimatedGeometryRoot->mParentAGR;
}
}
#ifdef NS_BUILD_REFCNT_LOGGING