Bug 1799732 Part 2 - Flatten the namespace for FrameChildList and co. by removing namespace layout. r=emilio

After moving FrameChildListID into mozilla namespace, `kPrincipalList` etc. are
also exposed in the mozilla namespace. In the next part, I'll convert
FrameChildListID enum into an enum class, so the naming pollution shouldn't be
an issue.

This patch has a nice side effect that it is now easier to remove all the
aliases of FrameChildListID (`kPrincipalList` etc.) defined in multiple places
since it is confusion to have the same thing written in different ways, e.g.
`nsIFrame::kPrincipalList`, `mozilla::layout::kPrincipalList`,
`FrameChildListID::kPrincipalList`, `kPrincipalList`.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D161863
This commit is contained in:
Ting-Yu Lin
2022-11-11 23:44:16 +00:00
parent b79841292f
commit da1dd7fade
28 changed files with 158 additions and 230 deletions

View File

@@ -115,7 +115,7 @@ static bool BlockHasAnyFloats(nsIFrame* aFrame) {
if (!block) {
return false;
}
if (block->GetChildList(nsIFrame::kFloatList).FirstChild()) {
if (block->GetChildList(kFloatList).FirstChild()) {
return true;
}
@@ -8170,8 +8170,7 @@ void nsBlockFrame::VerifyOverflowSituation() {
// A child float next-in-flow's parent must be |this| or a next-in-flow of
// |this|. Later next-in-flows must have the same or later parents.
nsIFrame::ChildListID childLists[] = {nsIFrame::kFloatList,
nsIFrame::kPushedFloatsList};
ChildListID childLists[] = {kFloatList, kPushedFloatsList};
for (size_t i = 0; i < ArrayLength(childLists); ++i) {
const nsFrameList& children = GetChildList(childLists[i]);
for (nsIFrame* f : children) {