Closed Bug 573354 Opened 14 years ago Closed 14 years ago

"ASSERTION: How did that happen??" changing <colgroup> & <col> span

Categories

(Core :: Layout: Tables, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b2

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(2 files)

Attached file testcase
###!!! ASSERTION: How did that happen??: 'col->GetStyleContext() == colFrame->GetStyleContext() && col->GetContent() == colFrame->GetContent()', file /Users/jruderman/mozilla-central/layout/tables/nsTableColGroupFrame.cpp, line 340

I think this is a recent regression.  bz fixed several bugs triggering this assertion in 2007: bug 404666, bug 404301, bug 403249.
Happened sometime in Boris' big push on Friday:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=88fa0b783306&tochange=d4156799e66a

A reconstruct is posted for the col content, when we remove its frame the following two anonymous col frames have a different style context.
I think this assert is just bogus if we get a restyle that _does_ restyle the <colgroup> but doesn't reframe it and also restyles + reframes the <col>, since we'll get a new stylecontext for the anon cols during the restyle but skip giving one to the about-to-be-reframed <col>.  We could presumably hit this before too, if the restyle ordering happened to be right, but now we guarantee that that <colgroup> will get restyled first.
Blocks: 479655
Attached patch Like soSplinter Review
Attachment #453126 - Flags: review?
Attachment #453126 - Flags: review? → review?(bernd_mozilla)
Comment on attachment 453126 [details] [diff] [review]
Like so

Sorry for being so slow with the review.

Just that I get the picture right:

else colFrame is being removed because of a frame
+        // reconstruct on it, and its style context is bogus at this
+        // point.

You  are using the bogus style context to make the decision that it is bogus?
Attachment #453126 - Flags: review?(bernd_mozilla) → review+
Yes.  "bogus" just means "hasn't been updated to the new style rules", not "deleted object", in this case.
You might want to change the comment then
OK, will do.
Assignee: nobody → bzbarsky
New comment:

+        // else colFrame is being removed because of a frame
+        // reconstruct on it, and its style context is still the old
+        // one, so we can't assert anything about how it compares to
+        // col's style context.
Assignee: bzbarsky → nobody
Assignee: nobody → bzbarsky
Pushed http://hg.mozilla.org/mozilla-central/rev/3e4c040baff3
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3b2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: