Closed Bug 1844501 Opened 2 years ago Closed 2 years ago

CustomIdent::from_ident usage can usually be simplified to CustomIdent::parse

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: zrhoffman, Assigned: zrhoffman)

References

Details

Attachments

(1 file)

Bug 1840477 adds CustomIdent::parse, which will usually be preferred over CustomIdent:from_ident as soon as as bug 1840477 lands.

One reason to still use CustomIdent::from_ident would be if the SourceLocation needs to be reused. Otherwise, a lot of the CustomIdent::from_ident usage can be simplified to CustomIdent::parse.

The remaining CustomIdent::from_ident usages do case-insensitive
comparisons (which should stay, since <custom-ident> is case-sensitive)
or reuse the token/ident instead of only creating a CustomIdent.

Assignee: nobody → zach
Status: NEW → ASSIGNED
Pushed by zach@zrhoffman.net: https://hg.mozilla.org/integration/autoland/rev/fb90638611ec Replace some CustomIdent::from_ident usage with CustomIdent::parse r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: