Make iframe's load event trigger a reflow of the enclosing window. Add a catch-all reflow for all same-origin pages sharing an event loop.a

This commit is contained in:
Josh Matthews 2016-01-25 15:01:53 -05:00
parent e5a1af5b7a
commit 7eca462c5a
3 changed files with 19 additions and 1 deletions

View file

@ -1028,6 +1028,14 @@ impl ScriptThread {
window.reflow(ReflowGoal::ForDisplay,
ReflowQueryType::NoQuery,
ReflowReason::ImageLoaded);
} else {
// Reflow currently happens when explicitly invoked by code that
// knows the document could have been modified. This should really
// be driven by the compositor on an as-needed basis instead, to
// minimize unnecessary work.
window.reflow(ReflowGoal::ForDisplay,
ReflowQueryType::NoQuery,
ReflowReason::MissingExplicitReflow);
}
}
}