Bug 1059138 band-aid: Skip flex item sortedness assertion if the first flex item is part of a shadow DOM. r=bz

Not sure what the right fix is here yet, but this should stop the new 'gaia-header' web component from making this dominate the logcat output.
This commit is contained in:
Daniel Holbert 2014-08-27 17:48:21 -07:00
parent 130ddc4d53
commit bc95e21070

View File

@ -1841,7 +1841,13 @@ nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
// XXXdholbert hacky temporary band-aid for bug 1059138: Trivially pass this
// assertion (skip it, basically) if the first child is part of a shadow DOM.
// (IsOrderLEQWithDOMFallback doesn't know how to compare tree-position of a
// shadow-DOM element vs. a non-shadow-DOM element.)
NS_ASSERTION(
(!mFrames.IsEmpty() &&
mFrames.FirstChild()->GetContent()->GetContainingShadow()) ||
nsIFrame::IsFrameListSorted<IsOrderLEQWithDOMFallback>(mFrames),
"Child frames aren't sorted correctly");