Closed Bug 698072 Opened 13 years ago Closed 12 years ago

Implement CSS2Properties without using an XPCOM interface for it

Categories

(Core :: DOM: CSS Object Model, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Unassigned)

References

Details

Right now we have the nsIDOMCSS2Properties interface for objects that have a DOM property for each CSS property. This involves some extra code for each property (though the quickstubs are pretty efficient). But the main problem with this is that it makes it a huge pain to implement CSS properties behind ifdefs or preferences. I recall discussing this a few months back (when we ran into this for bug 505115 or maybe bug 435442; we're now hitting it again in bug 696253). I think khuey said something about implementing the WebIDL concept of dictionaries in XPConnect (?) being able to help with this. But I really want to get rid of nsIDOMCSS2Properties sooner rather than later; it's the main obstacle to doing proper rapid-release development in the CSS code.
Could we add an IDL annotation that would skip defining the property on the prototype depending on a pref? If we really want to move away from IDL here, then how do we want this to work? We could set up a custom wrapping setup like we have for nodelists and just manually set up our prototype, I suppose. That's the same as adding the IDL annotations, but uses some non-idl method of listing properties... Peter, any other obvious options?
Talked with peterv about this online today. He thinks the way forward is to annotate the IDL to say "this is a interface that's exposed only to JS, not C++" and then teach the new dom bindings to do the right thing here.
This is done, yes?
Yep, in bug 753517.
Status: NEW → RESOLVED
Closed: 12 years ago
Depends on: 753517
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.