Bug 1388939, part 4 - Give clear names to the nsFrameManager methods for updating the registered undisplayed style contexts. r=dholbert
MozReview-Commit-ID: Bgm32Lfr5v9
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -6076,17 +6076,18 @@ nsCSSFrameConstructor::AddFrameConstruct
if (MOZ_UNLIKELY(bits & FCDATA_IS_CONTENTS)) {
if (!GetDisplayContentsStyleFor(aContent)) {
MOZ_ASSERT(styleContext->GetPseudo() || !isGeneratedContent,
"Should have had pseudo type");
aState.mFrameManager->RegisterDisplayContentsStyleFor(aContent,
styleContext);
} else {
- aState.mFrameManager->ChangeDisplayContents(aContent, styleContext);
+ aState.mFrameManager->ChangeRegisteredDisplayContentsStyleFor(aContent,
+ styleContext);
}
TreeMatchContext::AutoAncestorPusher ancestorPusher(aState.mTreeMatchContext);
if (aState.HasAncestorFilter()) {
ancestorPusher.PushAncestorAndStyleScope(aContent->AsElement());
} else {
ancestorPusher.PushStyleScope(aContent->AsElement());
}
@@ -9652,19 +9653,19 @@ nsCSSFrameConstructor::MaybeRecreateFram
}
// The parent has a frame, so try resolving a new context.
RefPtr<nsStyleContext> newContext = mPresShell->StyleSet()->
ResolveStyleFor(aElement, oldContext->AsGecko()->GetParent(),
LazyComputeBehavior::Assert);
if (oldDisplay == StyleDisplay::None) {
- ChangeUndisplayedContent(aElement, newContext);
+ ChangeRegisteredDisplayNoneStyleFor(aElement, newContext);
} else {
- ChangeDisplayContents(aElement, newContext);
+ ChangeRegisteredDisplayContentsStyleFor(aElement, newContext);
}
const nsStyleDisplay* disp = newContext->StyleDisplay();
if (oldDisplay == disp->mDisplay) {
// We can skip trying to recreate frames here, but only if our style
// context does not have a binding URI that differs from our old one.
// Otherwise, we should try to recreate, because we may want to apply the
// new binding
--- a/layout/base/nsFrameManager.h
+++ b/layout/base/nsFrameManager.h
@@ -95,27 +95,27 @@ public:
* Register the style context for the display:contents content, aContent.
*/
void RegisterDisplayContentsStyleFor(nsIContent* aContent,
nsStyleContext* aStyleContext);
/**
* Change the style context for the display:none content, aContent.
*/
- void ChangeUndisplayedContent(nsIContent* aContent,
- nsStyleContext* aStyleContext)
+ void ChangeRegisteredDisplayNoneStyleFor(nsIContent* aContent,
+ nsStyleContext* aStyleContext)
{
ChangeStyleContextInMap(mDisplayNoneMap, aContent, aStyleContext);
}
/**
* Change the style context for the display:contents content, aContent.
*/
- void ChangeDisplayContents(nsIContent* aContent,
- nsStyleContext* aStyleContext)
+ void ChangeRegisteredDisplayContentsStyleFor(nsIContent* aContent,
+ nsStyleContext* aStyleContext)
{
ChangeStyleContextInMap(mDisplayContentsMap, aContent, aStyleContext);
}
/**
* Get the style context for the display:none content, aContent.
*/
nsStyleContext* GetUndisplayedContent(const nsIContent* aContent)