Gecko:Adding ANew Style Struct

From MozillaWiki
Jump to: navigation, search

If you want to add a bundle of new style properties for a new CSS feature, you may want to add a new style struct to hold them. In bug http://bugzilla.mozilla.org/show_bug.cgi?id=245297 we added a new style struct to hold CSS column properties. The patch in that bug shows what you need to change. It added about 3K of code and did not noticeably impact pageload time, so adding a new style struct is pretty cheap.

There is also that old description written by Marc (http://lxr.mozilla.org/seamonkey/source/layout/doc/adding-style-props.html). Marc's description is rather out of date, though, and was focused on adding new style properties rather than an entire new style struct. New style structs are somewhat more work.