Bug 1656107 - remove FindContentForSubDocument use from EventStateManager. r=farre

Differential Revision: https://phabricator.services.mozilla.com/D98617
This commit is contained in:
Steven MacLeod 2020-12-16 01:06:39 +00:00
Родитель 063c946ad1
Коммит 1c72bc8ce8
1 изменённых файлов: 9 добавлений и 6 удалений

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

@ -4501,12 +4501,15 @@ void EventStateManager::NotifyMouseOver(WidgetMouseEvent* aMouseEvent,
// content associated with our subdocument. // content associated with our subdocument.
EnsureDocument(mPresContext); EnsureDocument(mPresContext);
if (Document* parentDoc = mDocument->GetInProcessParentDocument()) { if (Document* parentDoc = mDocument->GetInProcessParentDocument()) {
if (nsCOMPtr<nsIContent> docContent = if (RefPtr<BrowsingContext> bc = mDocument->GetBrowsingContext()) {
parentDoc->FindContentForSubDocument(mDocument)) { if (!bc->IsCached()) {
if (PresShell* parentPresShell = parentDoc->GetPresShell()) { if (nsCOMPtr<nsIContent> docContent = bc->GetEmbedderElement()) {
RefPtr<EventStateManager> parentESM = if (PresShell* parentPresShell = parentDoc->GetPresShell()) {
parentPresShell->GetPresContext()->EventStateManager(); RefPtr<EventStateManager> parentESM =
parentESM->NotifyMouseOver(aMouseEvent, docContent); parentPresShell->GetPresContext()->EventStateManager();
parentESM->NotifyMouseOver(aMouseEvent, docContent);
}
}
} }
} }
} }