mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1245925 - Don't allow expiring the displayport on root scrollframes. r=tnikkel
MozReview-Commit-ID: 8LGsk9uKyL5
This commit is contained in:
parent
c072530c75
commit
92d131a10a
@ -2353,7 +2353,7 @@ RemoveDisplayPortCallback(nsITimer* aTimer, void* aClosure)
|
||||
MOZ_ASSERT(helper->mDisplayPortExpiryTimer);
|
||||
helper->mDisplayPortExpiryTimer = nullptr;
|
||||
|
||||
if (helper->IsAlwaysActive() || helper->mIsScrollParent) {
|
||||
if (!helper->AllowDisplayPortExpiration() || helper->mIsScrollParent) {
|
||||
// If this is a scroll parent for some other scrollable frame, don't
|
||||
// expire the displayport because it would break scroll handoff. Once the
|
||||
// descendant scrollframes have their displayports expired, they will
|
||||
@ -2417,9 +2417,20 @@ void ScrollFrameHelper::ResetDisplayPortExpiryTimer()
|
||||
}
|
||||
}
|
||||
|
||||
void ScrollFrameHelper::TriggerDisplayPortExpiration()
|
||||
bool ScrollFrameHelper::AllowDisplayPortExpiration()
|
||||
{
|
||||
if (IsAlwaysActive()) {
|
||||
return false;
|
||||
}
|
||||
if (mIsRoot && mOuter->PresContext()->IsRoot()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void ScrollFrameHelper::TriggerDisplayPortExpiration()
|
||||
{
|
||||
if (!AllowDisplayPortExpiration()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -370,6 +370,7 @@ public:
|
||||
void NotifyImageVisibilityUpdate();
|
||||
bool GetDisplayPortAtLastImageVisibilityUpdate(nsRect* aDisplayPort);
|
||||
|
||||
bool AllowDisplayPortExpiration();
|
||||
void TriggerDisplayPortExpiration();
|
||||
void ResetDisplayPortExpiryTimer();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user