Closed Bug 299315 Opened 20 years ago Closed 14 years ago

WARNING: Positioned frame that does not handle positioned kids

Categories

(Core :: Layout, defect)

defect
Not set
trivial

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)

Details

(Keywords: testcase, Whiteboard: [reflow-refactor])

Attachments

(2 files)

Spawned from bug 299188 comment 14.

With the attached testcase we hit this warning in
nsCSSFrameConstructor::GetAbsoluteContainingBlock:

"WARNING: Positioned frame that does not handle positioned kids; looking further
up the parent chain, file nsCSSFrameConstructor.cpp, line 7841"

and the wrong frame is returned from GetAbsoluteContainingBlock() AFAICT.
We return the DIV when we should have returned the child area frame of the
FIELDSET, but because it's NULL at this point we continue traversing up...

A couple of alternatives to fix this:
1. in GetAbsoluteContainingBlock, store the result from GetFieldSetAreaFrame
   in a temp and don't asssign it to 'containingBlock' if it's NULL
   ('containingBlock' is correct at this point.)
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/base/nsCSSFrameConstructor.cpp&rev=1.1108&root=/cvsroot&mark=7794,7817-7821#7792

2. Somehow make the area frame the first child of the fieldset *before*
   processing children in nsCSSFrameConstructor::ConstructFieldSetFrame:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/base/nsCSSFrameConstructor.cpp&rev=1.1108&root=/cvsroot&mark=5062,5073,5088,5125,5132-5151,5158#5060
Attached file Testcase 1
Attached file Trace for Testcase 1
> 2. Somehow make the area frame the first child of the fieldset *before*

This should be the right solution, I think.  The problem is doing it without
triggering SetInitialChildList asserts and without triggering unnecessary
reflows...  The latter might be doable better once reflow refactoring lands.
Whiteboard: [reflow-refactor]
Cannot reproduce with a recent m-c debug build.
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: