Bug 1330843 adds an nsINodeProperty that allows us to attach a pseudo-element to a DOM element and have nsCSSFrameConstructor pull out the correct style during style resolution. A nice next step is to use this property for all the NAC creation routines, rather than having them mint custom style contexts. This would significantly simplify the CreateAnonymousContent() API, since we could specify the ancestry and pseudo-elements directly when the nodes are created, and just return a flat nsTArray<nsIContent*>. We need this for stylo.
Created attachment 8826810 [details] [diff] [review] Get rid of explicit style contexts in nsIAnonymousContentCreator::ContentInfo. v1 This is a WIP patch that eliminates the explicit style context setting, and delegates to the frame constructor to figure things out. But exactly what the frame constructor does is the subject of some discussion in bug 1331047 and bug 1330843, so that blocks us here.
I decided to just roll this into bug 1331322.
10 months ago