mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Bug 881832 - When flushing changes made by :hover style, make sure we also flush any pending changes on child documents. r=dbaron
--HG-- extra : rebase_source : 70d8e5f6805809fc8770f37932873b1ade7b0946
This commit is contained in:
parent
175d6d32b1
commit
a93f3b746c
@ -3630,6 +3630,16 @@ PresShell::ScheduleViewManagerFlush(PaintType aType)
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
FlushLayoutRecursive(nsIDocument* aDocument,
|
||||
void* aData = nullptr)
|
||||
{
|
||||
MOZ_ASSERT(!aData);
|
||||
aDocument->EnumerateSubDocuments(FlushLayoutRecursive, nullptr);
|
||||
aDocument->FlushPendingNotifications(Flush_Layout);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
|
||||
bool aFlushOnHoverChange)
|
||||
@ -3654,7 +3664,10 @@ PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
|
||||
hoverGenerationBefore != restyleManager->AsGecko()->GetHoverGeneration()) {
|
||||
// Flush so that the resulting reflow happens now so that our caller
|
||||
// can suppress any synthesized mouse moves caused by that reflow.
|
||||
FlushPendingNotifications(Flush_Layout);
|
||||
// This code only ever runs for the root document, but :hover changes
|
||||
// can happen in descendant documents too, so make sure we flush
|
||||
// all of them.
|
||||
FlushLayoutRecursive(mDocument);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user