Closed Bug 678929 Opened 13 years ago Closed 10 years ago

{ib} "ASSERTION: continuations should have the same style context"

Categories

(Core :: Layout, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(2 files)

Attached file testcase (deleted) —
###!!! ASSERTION: continuations should have the same style context: 'oldContext == nextIBSiblingContext || oldContext->GetPseudo() != nextIBSiblingContext->GetPseudo() || oldContext->GetParent() != nextIBSiblingContext->GetParent()', file layout/base/nsFrameManager.cpp, line 1198

This assertion was added in bug 670467. It is similar to the assertion in bug 615944.
Attached file stack trace (deleted) —
So this is an interesting case.  What happens here is that nextIBSiblingContext and oldContext are in fact identical (same parent, same rulenode, same bits, same pseudo tag, same if-visited style).  But they are not the same object, because the parent has 13 kids so we ran off the sharing threshold in nsStyleContext::FindChildWithRules.

I would think that a similar assert can be triggered for the existing in-flow code without any ib issues in sight, and in fact bug 615944 confirms that.

David, we need to either relax the assertions here or make the sharing more exact....
Blocks: 615944
It would probably make sense to use an equality check that's not pointer equality.
That would be the relaxing the assertion I referred to, yes.
The testcase in this bug no longer triggers the assertion, but other (even uglier) testcases do.  Is the explanation in comment 2 still relevant?
Not sure.

After recent changes in layout/style/RestyleManager.cpp the pointers should be kept equal as a result of being copied over every time we reresolve style, so the sharing optimization being inexact should no longer matter.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: