diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:26:13 -0400 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-04-17 05:26:13 -0400 |
commit | 0f5dcf963a2479a61e370b6b6ffac41be1d5e120 (patch) | |
tree | 95d5b40652d4916dfbbacb24aa7c2e5d27224105 | |
parent | 34e2c4054fc597ab9ef3355470a7b1c2c20bbc84 (diff) | |
download | UXP-0f5dcf963a2479a61e370b6b6ffac41be1d5e120.tar UXP-0f5dcf963a2479a61e370b6b6ffac41be1d5e120.tar.gz UXP-0f5dcf963a2479a61e370b6b6ffac41be1d5e120.tar.lz UXP-0f5dcf963a2479a61e370b6b6ffac41be1d5e120.tar.xz UXP-0f5dcf963a2479a61e370b6b6ffac41be1d5e120.zip |
Bug 1361086 - Simplify UndisplayedMap::GetListFor/GetOrCreateListFor to take nsIContent* rather than nsIContent**
Tag #1375
-rw-r--r-- | layout/base/nsFrameManager.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/layout/base/nsFrameManager.cpp b/layout/base/nsFrameManager.cpp index 6bcc715b9..83bcd61ec 100644 --- a/layout/base/nsFrameManager.cpp +++ b/layout/base/nsFrameManager.cpp @@ -116,8 +116,8 @@ public: void Clear(); protected: - LinkedList<UndisplayedNode>* GetListFor(nsIContent** aParentContent); - LinkedList<UndisplayedNode>* GetOrCreateListFor(nsIContent** aParentContent); + LinkedList<UndisplayedNode>* GetListFor(nsIContent* aParentContent); + LinkedList<UndisplayedNode>* GetOrCreateListFor(nsIContent* aParentContent); void AppendNodeFor(UndisplayedNode* aNode, nsIContent* aParentContent); /** * Get the applicable parent for the map lookup. This is almost always the @@ -696,12 +696,12 @@ nsFrameManagerBase::UndisplayedMap::GetApplicableParent(nsIContent* aParent) } LinkedList<UndisplayedNode>* -nsFrameManagerBase::UndisplayedMap::GetListFor(nsIContent** aParent) +nsFrameManagerBase::UndisplayedMap::GetListFor(nsIContent* aParent) { - *aParent = GetApplicableParent(*aParent); + aParent = GetApplicableParent(aParent); LinkedList<UndisplayedNode>* list; - if (Get(*aParent, &list)) { + if (Get(aParent, &list)) { return list; } @@ -709,17 +709,17 @@ nsFrameManagerBase::UndisplayedMap::GetListFor(nsIContent** aParent) } LinkedList<UndisplayedNode>* -nsFrameManagerBase::UndisplayedMap::GetOrCreateListFor(nsIContent** aParent) +nsFrameManagerBase::UndisplayedMap::GetOrCreateListFor(nsIContent* aParent) { - *aParent = GetApplicableParent(*aParent); - return LookupOrAdd(*aParent); + aParent = GetApplicableParent(aParent); + return LookupOrAdd(aParent); } UndisplayedNode* nsFrameManagerBase::UndisplayedMap::GetFirstNode(nsIContent* aParentContent) { - auto* list = GetListFor(&aParentContent); + auto* list = GetListFor(aParentContent); return list ? list->getFirst() : nullptr; } @@ -727,7 +727,7 @@ void nsFrameManagerBase::UndisplayedMap::AppendNodeFor(UndisplayedNode* aNode, nsIContent* aParentContent) { - LinkedList<UndisplayedNode>* list = GetOrCreateListFor(&aParentContent); + LinkedList<UndisplayedNode>* list = GetOrCreateListFor(aParentContent); #ifdef DEBUG for (UndisplayedNode* node = list->getFirst(); node; node = node->getNext()) { @@ -755,7 +755,7 @@ nsFrameManagerBase::UndisplayedMap::RemoveNodeFor(nsIContent* aParentContent, UndisplayedNode* aNode) { #ifdef DEBUG - auto list = GetListFor(&aParentContent); + auto list = GetListFor(aParentContent); MOZ_ASSERT(list, "content not in map"); aNode->removeFrom(*list); #else |