Bug 1388939, part 1 - Rename nsFrameManagerBase::mUndisplayedMap to mDisplayNoneMap. r=dholbert
authorJonathan Watt <jwatt@jwatt.org>
Tue, 01 Aug 2017 13:50:23 +0100
changeset 373926 5615257eb337ff70f1b246e5db61b4404b116120
parent 373925 9f7d0c8097625b38e740fb23efc75b6038cb3d11
child 373927 031a3b30aadf80eb786605f670e89e72e63ac727
push id32311
push userkwierso@gmail.com
push dateFri, 11 Aug 2017 01:14:57 +0000
treeherdermozilla-central@253a8560dc34 [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 1 - Rename nsFrameManagerBase::mUndisplayedMap to mDisplayNoneMap. r=dholbert MozReview-Commit-ID: 94vA4YJ2u
layout/base/nsFrameManager.cpp
layout/base/nsFrameManager.h
layout/base/nsFrameManagerBase.h
--- a/layout/base/nsFrameManager.cpp
+++ b/layout/base/nsFrameManager.cpp
@@ -44,17 +44,17 @@
 using namespace mozilla;
 using namespace mozilla::dom;
 
 //----------------------------------------------------------------------
 
 nsFrameManagerBase::nsFrameManagerBase()
   : mPresShell(nullptr)
   , mRootFrame(nullptr)
-  , mUndisplayedMap(nullptr)
+  , mDisplayNoneMap(nullptr)
   , mDisplayContentsMap(nullptr)
   , mIsDestroyingFrames(false)
 {
 }
 
 //----------------------------------------------------------------------
 
 /**
@@ -117,18 +117,18 @@ nsFrameManager::Destroy()
   // Destroy the frame hierarchy.
   mPresShell->SetIgnoreFrameDestruction(true);
 
   if (mRootFrame) {
     mRootFrame->Destroy();
     mRootFrame = nullptr;
   }
 
-  delete mUndisplayedMap;
-  mUndisplayedMap = nullptr;
+  delete mDisplayNoneMap;
+  mDisplayNoneMap = nullptr;
   delete mDisplayContentsMap;
   mDisplayContentsMap = nullptr;
 
   mPresShell = nullptr;
 }
 
 //----------------------------------------------------------------------
 
@@ -174,17 +174,17 @@ nsFrameManager::GetAllUndisplayedNodesIn
                                                nsIContent* aParentContent)
 {
   return aMap ? aMap->GetFirstNode(aParentContent) : nullptr;
 }
 
 UndisplayedNode*
 nsFrameManager::GetAllUndisplayedContentIn(nsIContent* aParentContent)
 {
-  return GetAllUndisplayedNodesInMapFor(mUndisplayedMap, aParentContent);
+  return GetAllUndisplayedNodesInMapFor(mDisplayNoneMap, aParentContent);
 }
 
 /* static */ void
 nsFrameManager::SetStyleContextInMap(UndisplayedMap* aMap,
                                      nsIContent* aContent,
                                      nsStyleContext* aStyleContext)
 {
   MOZ_ASSERT(!aStyleContext->GetPseudo(),
@@ -208,20 +208,20 @@ nsFrameManager::SetStyleContextInMap(Und
 #endif
   aMap->AddNodeFor(parent, aContent, aStyleContext);
 }
 
 void
 nsFrameManager::SetUndisplayedContent(nsIContent* aContent,
                                       nsStyleContext* aStyleContext)
 {
-  if (!mUndisplayedMap) {
-    mUndisplayedMap = new UndisplayedMap;
+  if (!mDisplayNoneMap) {
+    mDisplayNoneMap = new UndisplayedMap;
   }
-  SetStyleContextInMap(mUndisplayedMap, aContent, aStyleContext);
+  SetStyleContextInMap(mDisplayNoneMap, aContent, aStyleContext);
 }
 
 /* static */ void
 nsFrameManager::ChangeStyleContextInMap(UndisplayedMap* aMap,
                                         nsIContent* aContent,
                                         nsStyleContext* aStyleContext)
 {
   MOZ_ASSERT(aMap, "expecting a map");
@@ -246,24 +246,24 @@ void
 nsFrameManager::ClearUndisplayedContentIn(nsIContent* aContent,
                                           nsIContent* aParentContent)
 {
 #ifdef DEBUG_UNDISPLAYED_MAP
   static int i = 0;
   printf("ClearUndisplayedContent(%d): content=%p parent=%p --> ", i++, (void *)aContent, (void*)aParentContent);
 #endif
 
-  if (!mUndisplayedMap) {
+  if (!mDisplayNoneMap) {
     return;
   }
 
-  for (UndisplayedNode* node = mUndisplayedMap->GetFirstNode(aParentContent);
+  for (UndisplayedNode* node = mDisplayNoneMap->GetFirstNode(aParentContent);
        node; node = node->getNext()) {
     if (node->mContent == aContent) {
-      mUndisplayedMap->RemoveNodeFor(aParentContent, node);
+      mDisplayNoneMap->RemoveNodeFor(aParentContent, node);
 
 #ifdef DEBUG_UNDISPLAYED_MAP
       printf( "REMOVED!\n");
 #endif
       // make sure that there are no more entries for the same content
       MOZ_ASSERT(!GetUndisplayedContent(aContent),
                  "Found more undisplayed content data after removal");
       return;
@@ -278,18 +278,18 @@ nsFrameManager::ClearUndisplayedContentI
 void
 nsFrameManager::ClearAllMapsFor(nsIContent* aParentContent)
 {
 #if defined(DEBUG_UNDISPLAYED_MAP) || defined(DEBUG_DISPLAY_CONTENTS_MAP)
   static int i = 0;
   printf("ClearAllMapsFor(%d): parent=%p \n", i++, aParentContent);
 #endif
 
-  if (mUndisplayedMap) {
-    mUndisplayedMap->RemoveNodesFor(aParentContent);
+  if (mDisplayNoneMap) {
+    mDisplayNoneMap->RemoveNodesFor(aParentContent);
   }
   if (mDisplayContentsMap) {
     nsAutoPtr<LinkedList<UndisplayedNode>> list =
       mDisplayContentsMap->UnlinkNodesFor(aParentContent);
     if (list) {
       while (UndisplayedNode* node = list->popFirst()) {
         ClearAllMapsFor(node->mContent);
         delete node;
--- a/layout/base/nsFrameManager.h
+++ b/layout/base/nsFrameManager.h
@@ -76,29 +76,29 @@ public:
    * Destroy should be called when the frame tree managed by the frame
    * manager is no longer being displayed.
    */
   void Destroy();
 
   // Mapping undisplayed content
   nsStyleContext* GetUndisplayedContent(const nsIContent* aContent)
   {
-    if (!mUndisplayedMap) {
+    if (!mDisplayNoneMap) {
       return nullptr;
     }
-    return GetStyleContextInMap(mUndisplayedMap, aContent);
+    return GetStyleContextInMap(mDisplayNoneMap, aContent);
   }
   mozilla::UndisplayedNode*
     GetAllUndisplayedContentIn(nsIContent* aParentContent);
   void SetUndisplayedContent(nsIContent* aContent,
                              nsStyleContext* aStyleContext);
   void ChangeUndisplayedContent(nsIContent* aContent,
                                 nsStyleContext* aStyleContext)
   {
-    ChangeStyleContextInMap(mUndisplayedMap, aContent, aStyleContext);
+    ChangeStyleContextInMap(mDisplayNoneMap, aContent, aStyleContext);
   }
 
   void ClearUndisplayedContentIn(nsIContent* aContent,
                                  nsIContent* aParentContent);
 
   // display:contents related methods:
   /**
    * Return the registered display:contents style context for aContent, if any.
--- a/layout/base/nsFrameManagerBase.h
+++ b/layout/base/nsFrameManagerBase.h
@@ -46,14 +46,14 @@ public:
   }
 
 protected:
   class UndisplayedMap;
 
   // weak link, because the pres shell owns us
   nsIPresShell* MOZ_NON_OWNING_REF mPresShell;
   nsIFrame*                       mRootFrame;
-  UndisplayedMap*                 mUndisplayedMap;
+  UndisplayedMap*                 mDisplayNoneMap;
   UndisplayedMap*                 mDisplayContentsMap;
   bool                            mIsDestroyingFrames;  // The frame manager is destroying some frame(s).
 };
 
 #endif