Bug 1323319 - Make sure we can force paint remote tabs even during the first activation. r?billm
MozReview-Commit-ID: EV9u7M2i2sL
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -157,17 +157,16 @@ TabParent::TabParent(nsIContentParent* a
, mCursor(nsCursor(-1))
, mTabSetsCursor(false)
, mHasContentOpener(false)
#ifdef DEBUG
, mActiveSupressDisplayportCount(0)
#endif
, mLayerTreeEpoch(0)
, mPreserveLayers(false)
- , mFirstActivate(true)
{
MOZ_ASSERT(aManager);
}
TabParent::~TabParent()
{
}
@@ -2652,22 +2651,18 @@ TabParent::SetDocShellIsActive(bool isAc
// docshell is consider prerendered only if not active yet
mIsPrerendered &= !isActive;
mDocShellIsActive = isActive;
Unused << SendSetDocShellIsActive(isActive, mPreserveLayers, mLayerTreeEpoch);
// Ask the child to repaint using the PHangMonitor channel/thread (which may
// be less congested).
if (isActive) {
- if (mFirstActivate) {
- mFirstActivate = false;
- } else {
- ContentParent* cp = Manager()->AsContentParent();
- cp->ForceTabPaint(this, mLayerTreeEpoch);
- }
+ ContentParent* cp = Manager()->AsContentParent();
+ cp->ForceTabPaint(this, mLayerTreeEpoch);
}
return NS_OK;
}
NS_IMETHODIMP
TabParent::GetDocShellIsActive(bool* aIsActive)
{
--- a/dom/ipc/TabParent.h
+++ b/dom/ipc/TabParent.h
@@ -765,22 +765,16 @@ private:
static void RemoveTabParentFromTable(uint64_t aLayersId);
uint64_t mLayerTreeEpoch;
// If this flag is set, then the tab's layers will be preserved even when
// the tab's docshell is inactive.
bool mPreserveLayers;
- // Normally we call ForceTabPaint when activating a tab. But we don't do this
- // the first time we activate a tab. The tab is probably busy running the
- // initial content scripts and we don't want to force painting then; they're
- // probably quick and there's some cost to forcing painting.
- bool mFirstActivate;
-
public:
static TabParent* GetTabParentFromLayersId(uint64_t aLayersId);
};
struct MOZ_STACK_CLASS TabParent::AutoUseNewTab final
{
public:
AutoUseNewTab(TabParent* aNewTab, bool* aWindowIsNew, nsCString* aURLToLoad)