Closed Bug 1808226 Opened 2 years ago Closed 2 years ago

Consider storing values for :nth- selectors in a dedicated struct

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: zrhoffman, Assigned: zrhoffman)

References

Details

Attachments

(1 file)

As pointed out by :emilio, because :nth-child(), :nth-last-child(), :nth-of-type(), and :nth-last-of-type() all use An+B notation, those values could be stored in a common struct. Also, the code that handles them could be made less redundant by using a single Component for all 4, distinguishing between them using an enum.

Using NthSelectorData will make it easier to add selector lists for :nth
selectors later on, but this change by itself shouldn't change any
behavior.

Assignee: nobody → zach
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4896f286b625 Store values for :nth- selectors in dedicated struct NthSelectorData r=emilio
Blocks: 1808304
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: