"ASSERTION: A block's child's next in flow's parent must be a block" with -moz-column, table stuff

RESOLVED FIXED

Status

()

Core
Layout
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Jesse Ruderman, Assigned: roc)

Tracking

(Blocks: 2 bugs, {assertion, testcase})

Trunk
x86
All
assertion, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

11 years ago
Loading the testcase triggers:

###!!! ASSERTION: A block's child's next in flow's parent must be a block!: 'nifBlock->GetType() == nsGkAtoms::blockFrame || nifBlock->GetType() == nsGkAtoms::areaFrame', file /Users/jruderman/trunk/mozilla/layout/generic/nsBlockFrame.cpp, line 3104
(Reporter)

Comment 1

11 years ago
Created attachment 293595 [details]
testcase
In this case nifBlock is a table caption frame.  Does the assert just need adjusting?
Maybe the assert should use a QueryInterface (or IsFrameOfType)?
Created attachment 293607 [details] [diff] [review]
fix assert

This patch creates nsBlockFrame* nsLayoutUtils::GetAsBlock which wraps QueryInterface. After this I should file a folloup bug to change all kBlockCID QIs to use GetAsBlock ... that'd be a good first bug.
Assignee: nobody → roc
Status: NEW → ASSIGNED
Attachment #293607 - Flags: superreview?(bzbarsky)
Attachment #293607 - Flags: review?(bzbarsky)
OS --> All.  (I see this on Linux)
OS: Mac OS X → All
Comment on attachment 293607 [details] [diff] [review]
fix assert

Looks good.

That said, should a caption be splitting like it does in this case?
Attachment #293607 - Flags: superreview?(bzbarsky)
Attachment #293607 - Flags: superreview+
Attachment #293607 - Flags: review?(bzbarsky)
Attachment #293607 - Flags: review+
No. There is no way to reflow a caption continuation.

http://mxr.mozilla.org/seamonkey/source/layout/base/nsCSSFrameConstructor.cpp#10423

says "if there's a caption then replicate the caption", but it doesn't, as far as I can tell.

I'll post an additional patch to give captions unconstrained height.
Created attachment 293637 [details] [diff] [review]
reflow captions with unconstrained height

Fixes the assertion independently of the other patch.
Attachment #293637 - Flags: superreview?(bzbarsky)
Attachment #293637 - Flags: review?(bzbarsky)
Attachment #293637 - Flags: superreview?(bzbarsky)
Attachment #293637 - Flags: superreview+
Attachment #293637 - Flags: review?(bzbarsky)
Attachment #293637 - Flags: review+
Comment on attachment 293637 [details] [diff] [review]
reflow captions with unconstrained height

Very safe patch to silence an assertion
Attachment #293637 - Flags: approval1.9?

Updated

11 years ago
Attachment #293607 - Flags: approval1.9? → approval1.9+

Updated

11 years ago
Attachment #293637 - Flags: approval1.9? → approval1.9+
all checked in, plus the testcase as a crashtest.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.