Bug 1388939, part 4 - Give clear names to the nsFrameManager methods for updating the registered undisplayed style contexts. r=dholbert
authorJonathan Watt <jwatt@jwatt.org>
Tue, 01 Aug 2017 15:11:02 +0100
changeset 423413 8a86aaef19f75c1d808be5ce0f20d2198e09055d
parent 423412 0090af474246367f802c432c08664a7697f41c44
child 423414 4d13c2c742628dbd497e6a5d6248882e7bae04e5
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1388939
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1388939, part 4 - Give clear names to the nsFrameManager methods for updating the registered undisplayed style contexts. r=dholbert MozReview-Commit-ID: LZuleDSt6LR
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsFrameManager.h
--- 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, if any.
    */
   nsStyleContext* GetUndisplayedContent(const nsIContent* aContent)