Closed Bug 563837 Opened 14 years ago Closed 14 years ago

large numbers of frame construction assertions on reftests with reftest-print and position:fixed

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Assigned: bzbarsky)

Details

Attachments

(1 file)

layout/reftests/bugs/200774-1.html causes a very large number of assertions (30 on Linux, 35 on Windows and Mac):

The following five assertions repeat six or seven times:

^G###!!! ASSERTION: Why did we get called?: '!aChildContent->GetPrimaryFrame() || aChildContent->GetPrimaryFrame()->GetContent() != aChildContent', file /builds/slave/mozilla-central-macosx64-debug/build/layout/base/nsCSSFrameConstructor.cpp, line 2178
^G###!!! ASSERTION: Why did we get called?: '!aChildContent->GetPrimaryFrame() || aChildContent->GetPrimaryFrame()->GetContent() != aChildContent', file /builds/slave/mozilla-central-macosx64-debug/build/layout/base/nsCSSFrameConstructor.cpp, line 2178
^G###!!! ASSERTION: How did that happen?: '!mContent->GetPrimaryFrame()', file /builds/slave/mozilla-central-macosx64-debug/build/layout/base/nsCSSFrameConstructor.cpp, line 11846
^G###!!! ASSERTION: Losing track of existing primary frame: '!aFrame || !mPrimaryFrame || aFrame == mPrimaryFrame', file ../../dist/include/nsIContent.h, line 893
^G###!!! ASSERTION: Losing track of existing primary frame: '!aFrame || !mPrimaryFrame || aFrame == mPrimaryFrame', file ../../dist/include/nsIContent.h, line 893
Without looking in detail, it's reftest-print with a fixed element, seems like that would be the cause.
Also 0-10 on layout/reftests/bugs/417676.html
actually, it's strictly 10 on 417676.html and/or its -ref

also 15 on 427017-1.xhtml and 5 on 381497-f.html
Summary: large numbers of frame construction assertions on layout/reftests/bugs/200774-1.html → large numbers of frame construction assertions on reftests with reftest-print and position:fixed
Yeah, if we're calling into frame construction over and over again for this node to create the fixed frames on every page these asserts would fire.  Looks like ReplicateFixedFrames does just that.  There's similar code in table-land; see bug 553972.

Let me see if I can find the patch I wrote while debugging that; we should just land it.
Attached patch Proposed fixSplinter Review
I'm not entirely sure about adding the state to all those methods, but most of them should inline and optimize it away in opt builds...  and I'd rather like to keep the asserts in debug builds instead of just removing them.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #443545 - Flags: review?(roc)
Comment on attachment 443545 [details] [diff] [review]
Proposed fix

+  PRPackedBool              mSetPrimaryFrames;

Add a comment explaining what this means?
Attachment #443545 - Flags: review?(roc) → review+
When you land this, you should also remove the asserts() annotations referencing this bug that I added in http://hg.mozilla.org/mozilla-central/rev/39aa13ebf607
Pushed  http://hg.mozilla.org/mozilla-central/rev/994569c16070 with the comment fix, but forgot the asserts() fix.  Working on that now.
Flags: in-testsuite+
Pushed http://hg.mozilla.org/mozilla-central/rev/bdf8167b2c18 to fix those.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: