Bug 1388939, part 7 - Give clear names to the nsFrameManager methods for unregistering undisplayed style contexts. r=dholbert

MozReview-Commit-ID: EFtKqKBOPQH
This commit is contained in:
Jonathan Watt 2017-08-01 17:12:44 +01:00
parent 80b5a0301e
commit 0802c22f8d
3 changed files with 13 additions and 13 deletions

View File

@ -8641,7 +8641,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
if (!childFrame || childFrame->GetContent() != aChild) {
// XXXbz the GetContent() != aChild check is needed due to bug 135040.
// Remove it once that's fixed.
ClearUndisplayedContentIn(aChild, aContainer);
UnregisterDisplayNoneStyleFor(aChild, aContainer);
}
MOZ_ASSERT(!childFrame || !GetDisplayContentsStyleFor(aChild),
"display:contents nodes shouldn't have a frame");
@ -8677,7 +8677,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
}
}
}
ClearDisplayContentsIn(aChild, aContainer);
UnregisterDisplayContentsStyleFor(aChild, aContainer);
}
#ifdef MOZ_XUL
@ -8836,7 +8836,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
if (!childFrame || childFrame->GetContent() != aChild) {
// XXXbz the GetContent() != aChild check is needed due to bug 135040.
// Remove it once that's fixed.
ClearUndisplayedContentIn(aChild, aContainer);
UnregisterDisplayNoneStyleFor(aChild, aContainer);
return;
}
parentFrame = childFrame->GetParent();

View File

@ -243,8 +243,8 @@ nsFrameManager::ChangeStyleContextInMap(UndisplayedMap* aMap,
}
void
nsFrameManager::ClearUndisplayedContentIn(nsIContent* aContent,
nsIContent* aParentContent)
nsFrameManager::UnregisterDisplayNoneStyleFor(nsIContent* aContent,
nsIContent* aParentContent)
{
#ifdef DEBUG_UNDISPLAYED_MAP
static int i = 0;
@ -305,8 +305,8 @@ nsFrameManager::ClearAllMapsFor(nsIContent* aParentContent)
for (nsIContent* child = iter.GetNextChild(); child; child = iter.GetNextChild()) {
auto parent = child->GetParent();
if (parent != aParentContent) {
ClearUndisplayedContentIn(child, parent);
ClearDisplayContentsIn(child, parent);
UnregisterDisplayNoneStyleFor(child, parent);
UnregisterDisplayContentsStyleFor(child, parent);
}
}
}
@ -330,8 +330,8 @@ nsFrameManager::GetAllRegisteredDisplayContentsStylesIn(nsIContent* aParentConte
}
void
nsFrameManager::ClearDisplayContentsIn(nsIContent* aContent,
nsIContent* aParentContent)
nsFrameManager::UnregisterDisplayContentsStyleFor(nsIContent* aContent,
nsIContent* aParentContent)
{
#ifdef DEBUG_DISPLAY_CONTENTS_MAP
static int i = 0;

View File

@ -170,16 +170,16 @@ public:
* if any. If found, then this method also unregisters the style contexts
* for any display:contents and display:none descendants of aContent.
*/
void ClearUndisplayedContentIn(nsIContent* aContent,
nsIContent* aParentContent);
void UnregisterDisplayNoneStyleFor(nsIContent* aContent,
nsIContent* aParentContent);
/**
* Unregister the style context for the display:contents content, aContent,
* if any. If found, then this method also unregisters the style contexts
* for any display:contents and display:none descendants of aContent.
*/
void ClearDisplayContentsIn(nsIContent* aContent,
nsIContent* aParentContent);
void UnregisterDisplayContentsStyleFor(nsIContent* aContent,
nsIContent* aParentContent);
// Functions for manipulating the frame model