mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1195400 - Check ancestor geometry roots when determining scrollability of a layer. r=mattwoodrow
This commit is contained in:
parent
e339bd4ff2
commit
84649fa33f
@ -2097,18 +2097,30 @@ ContainerState::GetLayerCreationHint(const nsIFrame* aAnimatedGeometryRoot)
|
||||
if (mParameters.mInLowPrecisionDisplayPort) {
|
||||
return LayerManager::SCROLLABLE;
|
||||
}
|
||||
nsIFrame* animatedGeometryRootParent = aAnimatedGeometryRoot->GetParent();
|
||||
nsIScrollableFrame* scrollable = do_QueryFrame(animatedGeometryRootParent);
|
||||
if (scrollable
|
||||
#ifdef MOZ_B2G
|
||||
&& scrollable->WantAsyncScroll()
|
||||
#endif
|
||||
) {
|
||||
// WantAsyncScroll() returns false when the frame has overflow:hidden,
|
||||
// so we won't create tiled layers for overflow:hidden frames even if
|
||||
// they have a display port. The main purpose of the WantAsyncScroll check
|
||||
// is to allow the B2G camera app to use hardware composer for compositing.
|
||||
return LayerManager::SCROLLABLE;
|
||||
|
||||
// Check whether there's any active scroll frame on the animated geometry
|
||||
// root chain.
|
||||
nsIFrame* fParent;
|
||||
for (const nsIFrame* f = aAnimatedGeometryRoot;
|
||||
f != mContainerAnimatedGeometryRoot;
|
||||
f = nsLayoutUtils::GetAnimatedGeometryRootForFrame(mBuilder,
|
||||
fParent, mContainerAnimatedGeometryRoot)) {
|
||||
fParent = nsLayoutUtils::GetCrossDocParentFrame(f);
|
||||
if (!fParent) {
|
||||
break;
|
||||
}
|
||||
nsIScrollableFrame* scrollable = do_QueryFrame(fParent);
|
||||
if (scrollable
|
||||
#ifdef MOZ_B2G
|
||||
&& scrollable->WantAsyncScroll()
|
||||
#endif
|
||||
) {
|
||||
// WantAsyncScroll() returns false when the frame has overflow:hidden,
|
||||
// so we won't create tiled layers for overflow:hidden frames even if
|
||||
// they have a display port. The main purpose of the WantAsyncScroll check
|
||||
// is to allow the B2G camera app to use hardware composer for compositing.
|
||||
return LayerManager::SCROLLABLE;
|
||||
}
|
||||
}
|
||||
return LayerManager::NONE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user