2017-10-27 20:33:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-08-25 00:54:29 +04:00
|
|
|
|
|
|
|
#ifndef FrameChildList_h_
|
|
|
|
#define FrameChildList_h_
|
|
|
|
|
2018-12-19 03:50:09 +03:00
|
|
|
#include "mozilla/EnumSet.h"
|
2011-08-25 00:54:29 +04:00
|
|
|
#include "nsFrameList.h"
|
|
|
|
#include "nsTArray.h"
|
|
|
|
|
|
|
|
class nsIFrame;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace layout {
|
|
|
|
|
|
|
|
// enum FrameChildListID lives in nsFrameList.h to solve circular dependencies.
|
|
|
|
|
2014-01-06 03:31:14 +04:00
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
2011-08-25 00:54:29 +04:00
|
|
|
extern const char* ChildListName(FrameChildListID aListID);
|
|
|
|
#endif
|
|
|
|
|
2018-12-19 03:50:09 +03:00
|
|
|
using FrameChildListIDs = EnumSet<FrameChildListID>;
|
2011-08-25 00:54:29 +04:00
|
|
|
|
|
|
|
class FrameChildList {
|
|
|
|
public:
|
|
|
|
FrameChildList(const nsFrameList& aList, FrameChildListID aID)
|
|
|
|
: mList(aList), mID(aID) {}
|
|
|
|
nsFrameList mList;
|
|
|
|
FrameChildListID mID;
|
|
|
|
};
|
|
|
|
|
2014-01-03 01:28:19 +04:00
|
|
|
} // namespace layout
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2011-08-25 00:54:29 +04:00
|
|
|
inline void nsFrameList::AppendIfNonempty(
|
|
|
|
nsTArray<mozilla::layout::FrameChildList>* aLists,
|
|
|
|
mozilla::layout::FrameChildListID aListID) const {
|
|
|
|
if (NotEmpty()) {
|
2020-05-18 04:15:42 +03:00
|
|
|
aLists->EmplaceBack(*this, aListID);
|
2011-08-25 00:54:29 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* !defined(FrameChildList_h_) */
|