зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1423208 - Queue pending RenderLayers calls when there are DocShell creation blockers. r=mystor
MozReview-Commit-ID: H4MqkWnfCkF --HG-- extra : rebase_source : 046c41c0ef4de7d9e742cd98f5c87828c02d129c
This commit is contained in:
Родитель
2b75bd4264
Коммит
30bfe2cdc1
|
@ -437,6 +437,9 @@ TabChild::TabChild(nsIContentChild* aManager,
|
|||
#endif
|
||||
, mPendingDocShellIsActive(false)
|
||||
, mPendingDocShellReceivedMessage(false)
|
||||
, mPendingRenderLayers(false)
|
||||
, mPendingRenderLayersReceivedMessage(false)
|
||||
, mPendingLayerObserverEpoch(0)
|
||||
, mPendingDocShellBlockers(0)
|
||||
, mWidgetNativeData(0)
|
||||
{
|
||||
|
@ -2663,6 +2666,10 @@ TabChild::RemovePendingDocShellBlocker()
|
|||
mPendingDocShellReceivedMessage = false;
|
||||
InternalSetDocShellIsActive(mPendingDocShellIsActive);
|
||||
}
|
||||
if (!mPendingDocShellBlockers && mPendingRenderLayersReceivedMessage) {
|
||||
mPendingRenderLayersReceivedMessage = false;
|
||||
RecvRenderLayers(mPendingRenderLayers, mPendingLayerObserverEpoch);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -2696,6 +2703,13 @@ TabChild::RecvSetDocShellIsActive(const bool& aIsActive)
|
|||
mozilla::ipc::IPCResult
|
||||
TabChild::RecvRenderLayers(const bool& aEnabled, const uint64_t& aLayerObserverEpoch)
|
||||
{
|
||||
if (mPendingDocShellBlockers > 0) {
|
||||
mPendingRenderLayersReceivedMessage = true;
|
||||
mPendingRenderLayers = aEnabled;
|
||||
mPendingLayerObserverEpoch = aLayerObserverEpoch;
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
// Since requests to change the rendering state come in from both the hang
|
||||
// monitor channel and the PContent channel, we have an ordering problem. This
|
||||
// code ensures that we respect the order in which the requests were made and
|
||||
|
|
|
@ -983,8 +983,20 @@ private:
|
|||
#endif
|
||||
bool mCoalesceMouseMoveEvents;
|
||||
|
||||
// In some circumstances, a DocShell might be in a state where it is
|
||||
// "blocked", and we should not attempt to change its active state or
|
||||
// the underlying PresShell state until the DocShell becomes unblocked.
|
||||
// It is possible, however, for the parent process to send commands to
|
||||
// change those states while the DocShell is blocked. We store those
|
||||
// states temporarily as "pending", and only apply them once the DocShell
|
||||
// is no longer blocked.
|
||||
bool mPendingDocShellIsActive;
|
||||
bool mPendingDocShellReceivedMessage;
|
||||
bool mPendingRenderLayers;
|
||||
bool mPendingRenderLayersReceivedMessage;
|
||||
uint64_t mPendingLayerObserverEpoch;
|
||||
// When mPendingDocShellBlockers is greater than 0, the DocShell is blocked,
|
||||
// and once it reaches 0, it is no longer blocked.
|
||||
uint32_t mPendingDocShellBlockers;
|
||||
|
||||
WindowsHandle mWidgetNativeData;
|
||||
|
|
Загрузка…
Ссылка в новой задаче