Closed Bug 399219 Opened 12 years ago Closed 12 years ago

[FIX]"ASSERTION: Wrong parent style context" with xul:treeitem and -moz-inline-grid

Categories

(Core :: XUL, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9beta2

People

(Reporter: jruderman, Assigned: bzbarsky)

References

(Blocks 2 open bugs)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase
frame: Block(div)(0) (0x24ba978) style: 0x24ba928 {}
###!!! ASSERTION: Wrong parent style context: 'Error', file /Users/jruderman/trunk/mozilla/layout/base/nsFrameManager.cpp, line 818
Wrong parent style context:  style: 0x24ba8a0 {}
should be using:  style: 0x214df5c {}

###!!! ASSERTION: Style contexts are not in the same style context tree: 'top1 == top2', file /Users/jruderman/trunk/mozilla/layout/base/nsFrameManager.cpp, line 781
I claim that xul.css is buggy.  Or nsCSSFrameConstructor is.

To be precise, the problem is that when we set the <div> to display:none, we try to remove the frame.  But its parent is a <xul:treeitem>, so NotifyListBoxBody makes us bail out, and the ContentRemoved call does NOT in fact remove the frame from the tree.  Things sort of go downhill from there; I didn't really bother to figure out exactly how that failure leads to an incorrect style context on a frame that shouldn't even be there.

I think the rule at http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/content/xul.css&rev=1.103&mark=63-72#63 should use !important.  Alternately, we should remove the tree hack from NotifyListBoxBody.

Neil, Neil, any preference for course of action?
Flags: blocking1.9?
Off the top of my head I'd prefer to remove this hack that you mention.

I don't see any benefit in making the display rules important.
Attached patch Like soSplinter Review
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #284316 - Flags: superreview?(neil)
Attachment #284316 - Flags: review?(roc)
OS: Mac OS X → All
Priority: -- → P2
Hardware: PC → All
Summary: "ASSERTION: Wrong parent style context" with xul:treeitem and -moz-inline-grid → [FIX]"ASSERTION: Wrong parent style context" with xul:treeitem and -moz-inline-grid
Target Milestone: --- → mozilla1.9 M10
Attachment #284316 - Flags: superreview?(neil) → superreview+
Comment on attachment 284316 [details] [diff] [review]
Like so

Move the aUseXBLForms check to the front since it will always be false.
Attachment #284316 - Flags: review?(roc) → review+
Checked in, with that change.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: blocking1.9?
Resolution: --- → FIXED
Crashtest checked in.
Flags: in-testsuite+
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.