Closed
Bug 399209
Opened 17 years ago
Closed 17 years ago
[FIX]"ASSERTION: Wrong parent style context" with table stuff
Categories
(Core :: Layout, defect, P2)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla1.9beta2
People
(Reporter: jruderman, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
(Keywords: assertion, testcase)
Attachments
(2 files)
(deleted),
application/xhtml+xml
|
Details | |
(deleted),
patch
|
bernd_mozilla
:
review+
roc
:
superreview+
roc
:
approval1.9+
|
Details | Diff | Splinter Review |
Loading the testcase triggers:
frame: TableCol(col)(0) (0x2666d84) style: 0x2784110 {}
###!!! ASSERTION: Wrong parent style context: 'Error', file /Users/jruderman/trunk/mozilla/layout/base/nsFrameManager.cpp, line 818
Wrong parent style context: style: 0x2783758 {}
should be using: style: 0x2783dec {}
About half of the time, it also triggers:
###!!! ASSERTION: Style contexts are not in the same style context tree: 'top1 == top2', file /Users/jruderman/trunk/mozilla/layout/base/nsFrameManager.cpp, line 781
Assignee | ||
Comment 1•17 years ago
|
||
When we removed the col, we left the anonymous cols hanging around.... This patch makes sure to remove them. I'm not sure about replacing them with anonymous "cell" cols, but I think there are cases when we do need that, and detecting whether we do from here is hard. :( I _think_ having extra "cell" cols is ok, right?
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #284205 -
Flags: superreview?(roc)
Attachment #284205 -
Flags: review?(bernd_mozilla)
Assignee | ||
Updated•17 years ago
|
OS: Mac OS X → All
Priority: -- → P2
Hardware: PC → All
Summary: "ASSERTION: Wrong parent style context" with table stuff → [FIX]"ASSERTION: Wrong parent style context" with table stuff
Target Milestone: --- → mozilla1.9 M10
Comment on attachment 284205 [details] [diff] [review]
Fix
removing a col without calling nsTableFrame::RemoveCol is wrong.
Having the cols not in sync with the cellmap was tolerated for too long time.
Attachment #284205 -
Flags: review?(bernd_mozilla) → review-
Assignee | ||
Comment 3•17 years ago
|
||
Uh. This code IS calling RemoveCol for everyu single column it removes. It's just that RemoveCol replaces the col being removed with a eColAnonymousCell col. So if I have a <col span="3"> but only one cell, I'll end up with three eColAnonymousCell cols, not just one. That's the only odd thing about the behavior this patch gives.
If that behavior is not acceptable, then we have to somehow figure out the "right" number of eColAnonymousCell cols to create. Any ideas how? Perhaps RemoveCol should actually be RemoveCols so we can remove the whole span at once? But are eColAnonymousCell colframes ever removed explicitly?
Attachment #284205 -
Flags: superreview?(roc)
Assignee | ||
Comment 4•17 years ago
|
||
Comment on attachment 284205 [details] [diff] [review]
Fix
Resetting review request per comment 3.
Bernd, if it's really very important that the set of colframes after removal of a <col> exactly match what we would have had if the <col> were not there at all, I can do that. But it seems like we deal with extra cols anyway, because of spans...
Attachment #284205 -
Flags: review- → review?
Comment on attachment 284205 [details] [diff] [review]
Fix
Oh I did miss that this is a recursion call
Attachment #284205 -
Flags: review? → review+
Assignee | ||
Updated•17 years ago
|
Attachment #284205 -
Flags: superreview?(roc)
Attachment #284205 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 6•17 years ago
|
||
Comment on attachment 284205 [details] [diff] [review]
Fix
Requesting 1.9 approval. I think this is reasonably low-risk... it's definitely less risky than leaving the code as-is.
Attachment #284205 -
Flags: approval1.9?
Attachment #284205 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 7•17 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 9•17 years ago
|
||
Testcase checked in as a crashtest. (bz, did you want something more?)
Flags: in-testsuite? → in-testsuite+
Assignee | ||
Comment 10•17 years ago
|
||
I added reftests for this using both background and visibility:collapse.
Bernd, I put them under bugs/, but if you want me to put things like this under table-dom, let me know?
You need to log in
before you can comment on or make changes to this bug.
Description
•