Bug 1517080 Part 4 - Make nsFrameItems an alias of nFrameList, and remove nsFrameItems. r=mats

nsFrameItems will be removed in Part 6.

Differential Revision: https://phabricator.services.mozilla.com/D15554

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ting-Yu Lin 2019-03-30 03:25:10 +00:00
Родитель e84e0dd1de
Коммит ce65963e68
2 изменённых файлов: 1 добавлений и 29 удалений

Просмотреть файл

@ -613,34 +613,6 @@ inline void SetInitialSingleChild(nsContainerFrame* aParent, nsIFrame* aFrame) {
// -----------------------------------------------------------
// Structure used when constructing formatting object trees.
struct nsFrameItems : public nsFrameList {
// Appends the frame to the end of the list
void AddChild(nsIFrame* aChild);
};
void nsFrameItems::AddChild(nsIFrame* aChild) {
MOZ_ASSERT(aChild, "nsFrameItems::AddChild");
MOZ_ASSERT(!aChild->HasAnyStateBits(NS_FRAME_OUT_OF_FLOW) ||
aChild->GetPlaceholderFrame(),
"An out-of-flow child without a placeholder frame?");
// It'd be really nice if we could just AppendFrames(kPrincipalList, aChild)
// here, but some of our callers put frames that have different parents
// (caption, I'm looking at you) on the same framelist, and nsFrameList
// asserts if you try to do that.
if (IsEmpty()) {
SetFrames(aChild);
} else {
NS_ASSERTION(aChild != mLastChild,
"Same frame being added to frame list twice?");
mLastChild->SetNextSibling(aChild);
mLastChild = nsLayoutUtils::GetLastSibling(aChild);
}
}
// -----------------------------------------------------------
// Structure used when constructing formatting object trees. Contains
// state information needed for absolutely positioned elements
struct nsAbsoluteItems : nsFrameItems {

Просмотреть файл

@ -27,7 +27,7 @@
#include "nsIAnonymousContentCreator.h"
#include "nsFrameManager.h"
struct nsFrameItems;
using nsFrameItems = nsFrameList;
struct nsStyleDisplay;
struct nsGenConInitializer;