Backed out changeset 67a0b67ad8bb (bug 1821256) for causing mochitest-plain failures on test_group_keyboard.html.

This commit is contained in:
Iulian Moraru 2023-03-29 20:52:14 +03:00
parent e505210f70
commit c3d101c26c
3 changed files with 6 additions and 23 deletions

View File

@ -257,13 +257,8 @@ bool WebRenderLayerManager::EndEmptyTransaction(EndTransactionFlags aFlags) {
// Since we don't do repeat transactions right now, just set the time
mAnimationReadyTime = TimeStamp::Now();
#if MOZ_WIDGET_GTK
// Don't block on hidden windows on Linux as it may block all rendering
const bool throttle = mWidget->IsMapped();
#else
const bool throttle = true;
#endif
mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(throttle);
mLatestTransactionId =
mTransactionIdAllocator->GetTransactionId(/*aThrottle*/ true);
if (aFlags & EndTransactionFlags::END_NO_COMPOSITE &&
!mWebRenderCommandBuilder.NeedsEmptyTransaction()) {
@ -411,13 +406,8 @@ void WebRenderLayerManager::EndTransactionWithoutLayer(
nsLayoutUtils::NotifyPaintSkipTransaction(update);
}
#if MOZ_WIDGET_GTK
// Don't block on hidden windows on Linux as it may block all rendering
const bool throttle = mWidget->IsMapped();
#else
const bool throttle = true;
#endif
mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(throttle);
mLatestTransactionId =
mTransactionIdAllocator->GetTransactionId(/*aThrottle*/ true);
// Get the time of when the refresh driver start its tick (if available),
// otherwise use the time of when LayerManager::BeginTransaction was called.

View File

@ -155,7 +155,6 @@ class nsWindow final : public nsBaseWidget {
void SetParent(nsIWidget* aNewParent) override;
void SetModal(bool aModal) override;
bool IsVisible() const override;
bool IsMapped() const override { return mIsMapped; }
void ConstrainPosition(bool aAllowSlop, int32_t* aX, int32_t* aY) override;
void SetSizeConstraints(const SizeConstraints& aConstraints) override;
void LockAspectRatio(bool aShouldLock) override;
@ -282,6 +281,7 @@ class nsWindow final : public nsBaseWidget {
nsIFrame* GetFrame() const;
nsWindow* GetEffectiveParent();
bool IsDestroyed() const { return mIsDestroyed; }
bool IsMapped() const { return mIsMapped; }
bool IsPopup() const;
bool IsWaylandPopup() const;
bool IsPIPWindow() const { return mIsPIPWindow; };

View File

@ -682,18 +682,11 @@ class nsIWidget : public nsISupports {
virtual uint32_t GetMaxTouchPoints() const = 0;
/**
* Returns whether the window is visible from browser perspective.
* Returns whether the window is visible
*
*/
virtual bool IsVisible() const = 0;
/**
* Returns whether the window is visible from OS perspective,
* i.e. the window is really visible.
* It's used on Linux/Gtk where we should not paint to invisible window.
*/
virtual bool IsMapped() const { return false; }
/**
* Perform platform-dependent sanity check on a potential window position.
* This is guaranteed to work only for top-level windows.