mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1107606 - Ensure that setting a smooth scroll while APZ is enabled activates the layer. r=tn,kip
This commit is contained in:
parent
5c63a162c6
commit
f74d9fb16a
@ -2096,6 +2096,16 @@ ScrollFrameHelper::ScrollToWithOrigin(nsPoint aScrollPosition,
|
||||
mLastSmoothScrollOrigin = aOrigin;
|
||||
mScrollGeneration = ++sScrollGenerationCounter;
|
||||
|
||||
if (!nsLayoutUtils::GetDisplayPort(mOuter->GetContent())) {
|
||||
// If this frame doesn't have a displayport then there won't be an
|
||||
// APZC instance for it and so there won't be anything to process
|
||||
// this smooth scroll request. We should set a displayport on this
|
||||
// frame to force an APZC which can handle the request.
|
||||
nsLayoutUtils::CalculateAndSetDisplayPortMargins(
|
||||
mOuter->GetScrollTargetFrame(),
|
||||
nsLayoutUtils::RepaintMode::DoNotRepaint);
|
||||
}
|
||||
|
||||
// Schedule a paint to ensure that the frame metrics get updated on
|
||||
// the compositor thread.
|
||||
mOuter->SchedulePaint();
|
||||
|
Loading…
Reference in New Issue
Block a user