diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:41:41 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 06:41:41 -0400 |
commit | 96dfc63bc583454fb895c7a23f685995f5410388 (patch) | |
tree | 0acc6ed7feed9267c63e7d388a4ef24c015af467 /layout/base/nsPresShell.cpp | |
parent | ed7faf3fde0000b139414648269d2ff82846bac1 (diff) | |
download | UXP-96dfc63bc583454fb895c7a23f685995f5410388.tar UXP-96dfc63bc583454fb895c7a23f685995f5410388.tar.gz UXP-96dfc63bc583454fb895c7a23f685995f5410388.tar.lz UXP-96dfc63bc583454fb895c7a23f685995f5410388.tar.xz UXP-96dfc63bc583454fb895c7a23f685995f5410388.zip |
Bug 1411754 - Rename PresShell::DestroyFramesFor to DestroyFramesForAndRestyle
Tag #1375
Diffstat (limited to 'layout/base/nsPresShell.cpp')
-rw-r--r-- | layout/base/nsPresShell.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index f861e7b06..bd5125637 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -2828,7 +2828,7 @@ PresShell::CancelAllPendingReflows() } void -PresShell::DestroyFramesFor(Element* aElement) +PresShell::DestroyFramesForAndRestyle(Element* aElement) { MOZ_ASSERT(aElement); NS_ENSURE_TRUE_VOID(mPresContext); @@ -2847,13 +2847,15 @@ PresShell::DestroyFramesFor(Element* aElement) fc->DestroyFramesFor(aElement, &didReconstruct); fc->EndUpdate(); - // XXXmats doesn't frame state need to be restored in this case? - if (!didReconstruct) { - PostRecreateFramesFor(aElement); - } + auto changeHint = didReconstruct + ? nsChangeHint(0) + : nsChangeHint_ReconstructFrame; + // NOTE(emilio): eRestyle_Subtree is needed to force also a full subtree + // restyle for the content (in Stylo, where the existence of frames != the + // existence of styles). mPresContext->RestyleManager()->PostRestyleEvent( - aElement, eRestyle_Subtree, nsChangeHint(0)); + aElement, eRestyle_Subtree, changeHint); --mChangeNestCount; } |