зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1062100. Part 1: Remove ItemCoversScrollableArea. r=mattwoodrow
This isn't really part of this bug but it simplifies related code.
This commit is contained in:
Родитель
6bd4c4348a
Коммит
5f5e4c2d48
|
@ -2654,24 +2654,6 @@ IsScrollLayerItemAndOverlayScrollbarForScrollFrame(
|
|||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ContainerState::ItemCoversScrollableArea(nsDisplayItem* aItem, const nsRegion& aOpaque)
|
||||
{
|
||||
nsIPresShell* presShell = aItem->Frame()->PresContext()->PresShell();
|
||||
nsIFrame* rootFrame = presShell->GetRootFrame();
|
||||
if (mContainerFrame != rootFrame) {
|
||||
return false;
|
||||
}
|
||||
nsRect scrollableArea;
|
||||
if (presShell->IsScrollPositionClampingScrollPortSizeSet()) {
|
||||
scrollableArea = nsRect(nsPoint(0, 0),
|
||||
presShell->GetScrollPositionClampingScrollPortSize());
|
||||
} else {
|
||||
scrollableArea = rootFrame->GetRectRelativeToSelf();
|
||||
}
|
||||
return aOpaque.Contains(scrollableArea);
|
||||
}
|
||||
|
||||
nsIntRegion
|
||||
ContainerState::ComputeOpaqueRect(nsDisplayItem* aItem,
|
||||
const nsIFrame* aAnimatedGeometryRoot,
|
||||
|
@ -2692,8 +2674,8 @@ ContainerState::ComputeOpaqueRect(nsDisplayItem* aItem,
|
|||
}
|
||||
if (aAnimatedGeometryRoot == mContainerAnimatedGeometryRoot &&
|
||||
aFixedPosFrame == mContainerFixedPosFrame &&
|
||||
!aList->IsOpaque() &&
|
||||
opaqueClipped.Contains(mContainerBounds)) {
|
||||
*aHideAllLayersBelow = true;
|
||||
aList->SetIsOpaque();
|
||||
}
|
||||
// Add opaque areas to the "exclude glass" region. Only do this when our
|
||||
|
@ -2704,9 +2686,6 @@ ContainerState::ComputeOpaqueRect(nsDisplayItem* aItem,
|
|||
mBuilder->AddWindowOpaqueRegion(opaqueClipped);
|
||||
}
|
||||
opaquePixels = ScaleRegionToInsidePixels(opaqueClipped, snapOpaque);
|
||||
if (aFixedPosFrame && ItemCoversScrollableArea(aItem, opaque)) {
|
||||
*aHideAllLayersBelow = true;
|
||||
}
|
||||
|
||||
nsIScrollableFrame* sf = nsLayoutUtils::GetScrollableFrameFor(aAnimatedGeometryRoot);
|
||||
if (sf) {
|
||||
|
@ -3575,7 +3554,7 @@ ContainerState::PostprocessRetainedLayers(nsIntRegion* aOpaqueRegionForContainer
|
|||
|
||||
if (!data) {
|
||||
if (animatedGeometryRootToCover == mContainerAnimatedGeometryRoot &&
|
||||
!e->mFixedPosFrameForLayerData) {
|
||||
e->mFixedPosFrameForLayerData == mContainerFixedPosFrame) {
|
||||
NS_ASSERTION(opaqueRegionForContainer == -1, "Already found it?");
|
||||
opaqueRegionForContainer = opaqueRegions.Length();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче