Encode all pseudo-implementing native anonymous content with the pseudo type at creation time and simplify nsIAnonymousContentCreator::CreateAnonymousContent

RESOLVED DUPLICATE of bug 1331322

Status

()

Core
CSS Parsing and Computation
RESOLVED DUPLICATE of bug 1331322
11 months ago
10 months ago

People

(Reporter: Bobby Holley (parental leave - send mail for anything urgent), Assigned: Bobby Holley (parental leave - send mail for anything urgent))

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
Blocks: 1331047
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.
Depends on: 1331322
No longer depends on: 1330843
I decided to just roll this into bug 1331322.
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1331322
No longer blocks: 1331047
You need to log in before you can comment on or make changes to this bug.