Bug 1499828 Part 4 - Handle input events in the middleman when the active child is replaying, r=mccr8.

--HG--
extra : rebase_source : 626118f6f96da57ae1a76cbc9f16cd711f1514de
This commit is contained in:
Brian Hackett 2018-10-17 13:32:34 -06:00
Родитель 8cefe66b8d
Коммит 5df6d60bcd
2 изменённых файлов: 9 добавлений и 1 удалений

Просмотреть файл

@ -92,6 +92,14 @@ HandleMessageInMiddleman(ipc::Side aSide, const IPC::Message& aMessage)
return true;
}
// Send input events to the middleman when the active child is replaying,
// so that UI elements such as the replay overlay can be interacted with.
if (!ActiveChildIsRecording() && nsContentUtils::IsMessageInputEvent(aMessage)) {
ipc::IProtocol::Result r = dom::ContentChild::GetSingleton()->PContentChild::OnMessageReceived(aMessage);
MOZ_RELEASE_ASSERT(r == ipc::IProtocol::MsgProcessed);
return true;
}
// The content process has its own compositor, so compositor messages from
// the UI process should only be handled in the middleman.
if (type >= layers::PCompositorBridge::PCompositorBridgeStart &&

Просмотреть файл

@ -283,7 +283,7 @@ public:
bool
ActiveChildIsRecording()
{
return gActiveChild->IsRecording();
return gActiveChild && gActiveChild->IsRecording();
}
ChildProcessInfo*