From 0f5dcf963a2479a61e370b6b6ffac41be1d5e120 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 17 Apr 2020 05:26:13 -0400 Subject: Bug 1361086 - Simplify UndisplayedMap::GetListFor/GetOrCreateListFor to take nsIContent* rather than nsIContent** Tag #1375 --- layout/base/nsFrameManager.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'layout/base/nsFrameManager.cpp') 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* GetListFor(nsIContent** aParentContent); - LinkedList* GetOrCreateListFor(nsIContent** aParentContent); + LinkedList* GetListFor(nsIContent* aParentContent); + LinkedList* 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* -nsFrameManagerBase::UndisplayedMap::GetListFor(nsIContent** aParent) +nsFrameManagerBase::UndisplayedMap::GetListFor(nsIContent* aParent) { - *aParent = GetApplicableParent(*aParent); + aParent = GetApplicableParent(aParent); LinkedList* list; - if (Get(*aParent, &list)) { + if (Get(aParent, &list)) { return list; } @@ -709,17 +709,17 @@ nsFrameManagerBase::UndisplayedMap::GetListFor(nsIContent** aParent) } LinkedList* -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* list = GetOrCreateListFor(&aParentContent); + LinkedList* 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 -- cgit v1.2.3