Closed Bug 1808304 Opened 2 years ago Closed 2 years ago

Consider having NthType include OnlyChild and OnlyOfType

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

(2 files)

As :emilio notes, we could remove remove Component::FirstChild, Component::FirstOfType, Component::LastChild, Component::LastOfType, Component::OnlyChild, and Component::OnlyOfType if

  • NthType includes OnlyChild and OnlyOfType, and if
  • NthSelectorData has a boolean is_function field.

Like bug 1808226, this doesn't change any behavior, it just simplifies matching.

I also added a WPT JavaScript test for :only-of-type, since dedicated WPT
JavScript tests already exist for the other pseudo-classes this patch
touches.

Assignee: nobody → zach
Status: NEW → ASSIGNED
Depends on: 1808226

This makes the matching / parsing more self-contained, and I believe
it's generally easier to follow. Also addresses review comments from the
previous patch.

Blocks: 1808227
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/216344853e42 Represent FirstChild, FirstOfType, LastChild, LastOfType, OnlyChild, and OnlyOfType as functionless Nth variants r=emilio https://hg.mozilla.org/integration/autoland/rev/93fb62b97919 Minor clean-ups and fixes on top of the previous patch. r=zrhoffman
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/37740 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: