Bug 1353888 part 2: Assert that CSSOrderAwareFrameIterator is only used on flex/grid children. r=mats

MozReview-Commit-ID: 1uUj9XESHjB

--HG--
extra : rebase_source : 1f40adbd5bbd70235218ebb763b4bdc2b3de5b10
This commit is contained in:
Daniel Holbert 2017-04-07 11:46:35 -07:00
Родитель 6d1c181798
Коммит 40c4434077
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -78,6 +78,14 @@ public:
, mListID(aListID)
#endif
{
#ifdef DEBUG
{
const nsIAtom* type = aContainer->GetType();
MOZ_ASSERT(type == nsGkAtoms::flexContainerFrame ||
type == nsGkAtoms::gridContainerFrame,
"Only use this iterator in a container that honors 'order'");
}
#endif
size_t count = 0;
bool isOrdered = aState != eKnownUnordered;
if (aState == eUnknownOrder) {