Closed Bug 128408 Opened 23 years ago Closed 23 years ago

XBL Select widgets crash in embedding apps

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
blocker

Tracking

()

VERIFIED FIXED
mozilla1.0

People

(Reporter: bryner, Assigned: bryner)

References

Details

(Keywords: topembed+)

Attachments

(1 file, 1 obsolete file)

Ok, this is definitely a blocker for turning on XBL form controls. From what I can tell, here's the problem: At the time that we construct an outlinerbodyframe, the binding for the outlinercols has not yet loaded, so we have not yet constructed a nsOutlinerColFrame. This causes outliner's intrinsic sizing to crash. Making the binding load synchronously turns out to be a fair bit of work, but something we may have to do anyway. In order for synchronous loading of the binding to work, we would need to sync load the resources (stylesheets) for the base binding. This would entail extending the CSS loader to support sync loading, and causing XBL to use this facility when you ask for a binding to be sync loaded (I think this would always be desired if you are sync loading the binding, hyatt correct me if I'm wrong). The CSS loader already supports sync loading of agent sheets, so this would just be a general extension of that mechanism (I don't think we awnt to actually load the binding stylesheets _as_ agent sheets). The other option would be to duplicate the outlinercols binding into select.xml so that it won't use scoped stylesheets. I'd prefer not to do this, as it means that the two copies wouldn't be able to share prototype bindings (hence a slight footprint hit). On the plus side, it would break the dependency on toolkit.jar; not sure this is all that important since we can already generate a minimal embed.jar.
One more note: the reason this doesn't happen in Mozilla is that the outlinercol binding can load synchronously from the XUL cache. nsbeta1+'ing since this will obviously block 112713.
Blocks: 112713
Status: NEW → ASSIGNED
Keywords: nsbeta1+
Target Milestone: --- → mozilla1.0
A third way to fix this would be to make OutlinerBodyFrame able to function with its column frames constructed later; this seems like a bad idea all-around because it would generate extra reflows as the outliner resizes.
cc'ing jud since this affects embeddding
Keywords: topembed+
Attached patch patch (obsolete) (deleted) — Splinter Review
Well, there turns out to be an easy way to fix this...
Attached patch patch #2 (deleted) — Splinter Review
Also fixing the forced sync loading of the select binding, which was probably never working right. This fixes the problem of mysterious missing select widgets.
Attachment #72247 - Attachment is obsolete: true
Comment on attachment 72266 [details] [diff] [review] patch #2 looks good r=varga
Attachment #72266 - Flags: review+
Checked in on the trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
QA Contact: madhur → tpreston
Verified patch checked into lxr.mozilla.org
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: