Backed out changeset 40c010000007 (bug 1009272) for B2G build bustage

This commit is contained in:
Wes Kocher 2014-05-19 17:20:05 -07:00
Родитель dcad59dc18
Коммит ebc2c1341a
3 изменённых файлов: 1 добавлений и 70 удалений

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

@ -1552,7 +1552,7 @@ bool
FrameWantsToBeInAnonymousFlexItem(nsIFrame* aFrame)
{
// Note: This needs to match the logic in
// nsCSSFrameConstructor::FrameConstructionItem::NeedsAnonFlexOrGridItem()
// nsCSSFrameConstructor::FrameConstructionItem::NeedsAnonFlexItem()
return (aFrame->IsFrameOfType(nsIFrame::eLineParticipant) ||
nsGkAtoms::placeholderFrame == aFrame->GetType());
}

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

@ -48,10 +48,6 @@ nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
return;
}
#ifdef DEBUG
SanityCheckAnonymousGridItems();
#endif // DEBUG
nsMargin bp = aReflowState.ComputedPhysicalBorderPadding();
ApplySkipSides(bp);
nscoord contentHeight = GetEffectiveComputedHeight(aReflowState);
@ -78,64 +74,3 @@ nsGridContainerFrame::GetFrameName(nsAString& aResult) const
return MakeFrameName(NS_LITERAL_STRING("GridContainer"), aResult);
}
#endif
#ifdef DEBUG
static bool
FrameWantsToBeInAnonymousGridItem(nsIFrame* aFrame)
{
// Note: This needs to match the logic in
// nsCSSFrameConstructor::FrameConstructionItem::NeedsAnonFlexOrGridItem()
return (aFrame->IsFrameOfType(nsIFrame::eLineParticipant) ||
nsGkAtoms::placeholderFrame == aFrame->GetType());
}
// Debugging method, to let us assert that our anonymous grid items are
// set up correctly -- in particular, we assert:
// (1) we don't have any inline non-replaced children
// (2) we don't have any consecutive anonymous grid items
// (3) we don't have any empty anonymous grid items
// (4) all children are on the expected child lists
void
nsGridContainerFrame::SanityCheckAnonymousGridItems() const
{
// XXX handle kOverflowContainersList / kExcessOverflowContainersList
// when we implement fragmentation?
FrameChildListIDs noCheckLists = kAbsoluteList | kFixedList;
FrameChildListIDs checkLists = kPrincipalList | kOverflowList;
for (nsIFrame::ChildListIterator childLists(this);
!childLists.IsDone(); childLists.Next()) {
if (!checkLists.Contains(childLists.CurrentID())) {
MOZ_ASSERT(noCheckLists.Contains(childLists.CurrentID()),
"unexpected non-empty child list");
continue;
}
bool prevChildWasAnonGridItem = false;
nsFrameList children = childLists.CurrentList();
for (nsFrameList::Enumerator e(children); !e.AtEnd(); e.Next()) {
nsIFrame* child = e.get();
MOZ_ASSERT(!FrameWantsToBeInAnonymousGridItem(child),
"frame wants to be inside an anonymous grid item, "
"but it isn't");
if (child->StyleContext()->GetPseudo() ==
nsCSSAnonBoxes::anonymousGridItem) {
/*
XXX haven't decided yet whether to reorder children or not.
XXX If we do, we want this assertion instead of the one below.
MOZ_ASSERT(!prevChildWasAnonGridItem ||
HasAnyStateBits(NS_STATE_GRID_CHILDREN_REORDERED),
"two anon grid items in a row (shouldn't happen, unless our "
"children have been reordered with the 'order' property)");
*/
MOZ_ASSERT(!prevChildWasAnonGridItem, "two anon grid items in a row");
nsIFrame* firstWrappedChild = child->GetFirstPrincipalChild();
MOZ_ASSERT(firstWrappedChild,
"anonymous grid item is empty (shouldn't happen)");
prevChildWasAnonGridItem = true;
} else {
prevChildWasAnonGridItem = false;
}
}
}
}
#endif // DEBUG

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

@ -40,10 +40,6 @@ protected:
friend nsIFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
nsStyleContext* aContext);
nsGridContainerFrame(nsStyleContext* aContext) : nsContainerFrame(aContext) {}
#ifdef DEBUG
void SanityCheckAnonymousGridItems() const;
#endif // DEBUG
};
#endif /* nsGridContainerFrame_h___ */