зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1620817. Invalidate when the BrowserChild gets a different visible rect. r=mattwoodrow
layout/reftests/bugs/370422-1.html changes the size of a fission iframe. Bug 1615504 made sure the visible rect got to the child process. But there is still a failure mode where (I assume) all invalidations/painting of changing the document size in the iframe content process happens before the effects visible rect ipc msg arrives at the content process. In this case we still need to invalidate even though we use the correct visible rect on the builder we need a dirty rect that includes the unveiled area. Depends on D65888 Differential Revision: https://phabricator.services.mozilla.com/D65889 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a8bf6fdef8
Коммит
e424589434
|
@ -2814,8 +2814,33 @@ void BrowserChild::NotifyPainted() {
|
|||
}
|
||||
|
||||
IPCResult BrowserChild::RecvUpdateEffects(const EffectsInfo& aEffects) {
|
||||
bool needInvalidate = false;
|
||||
if (mEffectsInfo.IsVisible() && aEffects.IsVisible() &&
|
||||
mEffectsInfo != aEffects) {
|
||||
// if we are staying visible and either the visrect or scale changed we need
|
||||
// to invalidate
|
||||
needInvalidate = true;
|
||||
}
|
||||
|
||||
mEffectsInfo = aEffects;
|
||||
UpdateVisibility();
|
||||
|
||||
if (needInvalidate) {
|
||||
nsCOMPtr<nsIDocShell> docShell = do_GetInterface(WebNavigation());
|
||||
if (docShell) {
|
||||
// We don't use BrowserChildBase::GetPresShell() here because that would
|
||||
// create a content viewer if one doesn't exist yet. Creating a content
|
||||
// viewer can cause JS to run, which we want to avoid.
|
||||
// nsIDocShell::GetPresShell returns null if no content viewer exists yet.
|
||||
RefPtr<PresShell> presShell = docShell->GetPresShell();
|
||||
if (presShell) {
|
||||
if (nsIFrame* root = presShell->GetRootFrame()) {
|
||||
root->InvalidateFrame();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче