Bug 1388939, part 6 - Give clear names to the nsFrameManager methods for obtaining the linked list of undisplayed style contexts for a node. r=dholbert

MozReview-Commit-ID: 5EuaFzCW4Lh
This commit is contained in:
Jonathan Watt 2017-08-01 17:03:07 +01:00
parent 26a2ad3013
commit 80b5a0301e
3 changed files with 12 additions and 10 deletions

View File

@ -1517,10 +1517,10 @@ ElementRestyler::DoConditionallyRestyleUndisplayedDescendants(
Element* aRestyleRoot)
{
nsCSSFrameConstructor* fc = mPresContext->FrameConstructor();
UndisplayedNode* nodes = fc->GetAllUndisplayedContentIn(aParent);
UndisplayedNode* nodes = fc->GetAllRegisteredDisplayNoneStylesIn(aParent);
ConditionallyRestyleUndisplayedNodes(nodes, aParent,
StyleDisplay::None, aRestyleRoot);
nodes = fc->GetAllDisplayContentsIn(aParent);
nodes = fc->GetAllRegisteredDisplayContentsStylesIn(aParent);
ConditionallyRestyleUndisplayedNodes(nodes, aParent,
StyleDisplay::Contents, aRestyleRoot);
}
@ -1724,8 +1724,8 @@ ElementRestyler::MoveStyleContextsForChildren(GeckoStyleContext* aOldContext)
nsIContent* undisplayedParent;
if (MustCheckUndisplayedContent(mFrame, undisplayedParent)) {
nsCSSFrameConstructor* fc = mPresContext->FrameConstructor();
if (fc->GetAllUndisplayedContentIn(undisplayedParent) ||
fc->GetAllDisplayContentsIn(undisplayedParent)) {
if (fc->GetAllRegisteredDisplayNoneStylesIn(undisplayedParent) ||
fc->GetAllRegisteredDisplayContentsStylesIn(undisplayedParent)) {
return false;
}
}
@ -3191,10 +3191,10 @@ ElementRestyler::DoRestyleUndisplayedDescendants(nsRestyleHint aChildRestyleHint
GeckoStyleContext* aParentContext)
{
nsCSSFrameConstructor* fc = mPresContext->FrameConstructor();
UndisplayedNode* nodes = fc->GetAllUndisplayedContentIn(aParent);
UndisplayedNode* nodes = fc->GetAllRegisteredDisplayNoneStylesIn(aParent);
RestyleUndisplayedNodes(aChildRestyleHint, nodes, aParent,
aParentContext, StyleDisplay::None);
nodes = fc->GetAllDisplayContentsIn(aParent);
nodes = fc->GetAllRegisteredDisplayContentsStylesIn(aParent);
RestyleUndisplayedNodes(aChildRestyleHint, nodes, aParent,
aParentContext, StyleDisplay::Contents);
}

View File

@ -177,7 +177,7 @@ nsFrameManager::GetAllUndisplayedNodesInMapFor(UndisplayedMap* aMap,
}
UndisplayedNode*
nsFrameManager::GetAllUndisplayedContentIn(nsIContent* aParentContent)
nsFrameManager::GetAllRegisteredDisplayNoneStylesIn(nsIContent* aParentContent)
{
return GetAllUndisplayedNodesInMapFor(mDisplayNoneMap, aParentContent);
}
@ -324,7 +324,7 @@ nsFrameManager::RegisterDisplayContentsStyleFor(nsIContent* aContent,
}
UndisplayedNode*
nsFrameManager::GetAllDisplayContentsIn(nsIContent* aParentContent)
nsFrameManager::GetAllRegisteredDisplayContentsStylesIn(nsIContent* aParentContent)
{
return GetAllUndisplayedNodesInMapFor(mDisplayContentsMap, aParentContent);
}

View File

@ -142,14 +142,16 @@ public:
* that have been registered for the display:none children of
* aParentContent.
*/
UndisplayedNode* GetAllUndisplayedContentIn(nsIContent* aParentContent);
UndisplayedNode*
GetAllRegisteredDisplayNoneStylesIn(nsIContent* aParentContent);
/**
* Return the linked list of UndisplayedNodes that contain the style contexts
* that have been registered for the display:contents children of
* aParentContent.
*/
UndisplayedNode* GetAllDisplayContentsIn(nsIContent* aParentContent);
UndisplayedNode*
GetAllRegisteredDisplayContentsStylesIn(nsIContent* aParentContent);
/**
* Return the relevant undisplayed node for a given content with display: