mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
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:
parent
e84e0dd1de
commit
ce65963e68
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user