Closed Bug 873172 Opened 12 years ago Closed 12 years ago

Assertion failure: "Frame list should've been sorted in reflow" with flexbox, :after, table-cell

Categories

(Core :: Layout, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: jruderman, Assigned: dholbert)

References

Details

(Keywords: assertion, testcase)

Attachments

(3 files, 2 obsolete files)

Attached file testcase
Assertion failure: nsLayoutUtils::IsFrameListSorted<IsOrderLEQWithDOMFallback>(mFrames) (Frame list should've been sorted in reflow), at layout/generic/nsFlexContainerFrame.cpp:1111 Similar to bug 826483, which dholbert fixed two weeks ago.
Attached file stack (gdb)
So, bug 867454 added a special-case for flex container's children that have ":after". However, in this case, the :after frame isn't a *child* of the flex container -- it's wrapped inside several anonymous table boxes. (since it's a table-cell frame) We should be able to use the existing logic in GetContentForComparison() to descend through those anonymous frames.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Component: Canvas: 2D → Layout
Depends on: 867454
OS: Mac OS X → All
Hardware: x86_64 → All
Attached patch fix v1 (obsolete) — Splinter Review
This patch converts the existing "GetContentForComparison" helper-function into a more targeted "GetFirstNonAnonBoxDescendant" method, and calls it slightly earlier, so that we can benefit from it when checking for ::before and ::after.
Attachment #750744 - Flags: review?(bzbarsky)
Attached patch fix v1a [just tweaked a comment] (obsolete) — Splinter Review
Oops; noticed a stale (& now duplicate) comment about << Same "order" value >>. I tweaked it to instead say "Usual case" (as opposed to the Special case above it, for ::before/::after)
Attachment #750744 - Attachment is obsolete: true
Attachment #750744 - Flags: review?(bzbarsky)
Attachment #750747 - Flags: review?(bzbarsky)
Flags: in-testsuite?
Comment on attachment 750747 [details] [diff] [review] fix v1a [just tweaked a comment] Ah, very nice! r=me
Attachment #750747 - Flags: review?(bzbarsky) → review+
Thanks! Try run, with the patches for this bug and Bug 825810: https://tbpl.mozilla.org/?tree=Try&rev=21312c3ec51b
Apparently I just eyeballed the reftest instead of actually running it, so it turns out it fails, but it fails in a way that's actually expected, so it's a test-bug and not a code-bug. The test fails because we're ignoring "align-self" on the ::before/::after table-cell and table-row elements. This is correct behavior, because align-self only applies to flex items, and the cell/row aren't themselves flex items -- they get wrapped in tables, and the *tables* are the flex items. So, I'm just going to rename the reftest to "flexbox-with-pseudo-elements-3.html" (instead of "-1b") and give it its own reference case. (The reference case will be similar to flexbox-with-pseudo-elements-1-ref.html, but without the "align-self" settings.) (Note: the reftest also happens to aborts in debug builds when the patch for bug 825810 is also applied, as it was in that Try run -- but that's an issue in that bug's patch & it has a relatively straightforward solution -- I'll discuss that abort issue over on bug 825810.)
Here's the patch with that fixed. Carrying forward r=bz. Try run with that fixed (just reftests, & just this patch -- not bug 825810 anymore): https://tbpl.mozilla.org/?tree=Try&rev=8a071ff5e5b4
Attachment #750747 - Attachment is obsolete: true
Attachment #751410 - Flags: review+
Flags: in-testsuite? → in-testsuite+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: