Closed Bug 2007503 Opened 2 months ago Closed 2 months ago

Redundant `'outer_loop` label in selector parser after loop refactoring

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
148 Branch
Tracking Status
firefox148 --- fixed

People

(Reporter: nabeyang, Assigned: nabeyang)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

Steps to reproduce:

I reviewed the selector parsing code and noticed that the 'outer_loop label
is still present even though the nested loop structure that previously
required it has been removed.

Actual results:

The code still uses a labeled loop ('outer_loop) and explicit
break 'outer_loop; statements, even though a plain break; would have the
same effect.

Expected results:

Since the parser no longer contains a nested loop that requires breaking out
of an outer scope, the 'outer_loop label should be removed, and
break 'outer_loop; should be replaced with a plain break;.

The selector parser previously relied on a labeled 'outer_loop to break out
of nested loops when parsing combinators.

After recent refactoring, the nested loop structure no longer exists, and all
break statements target the same loop. As a result, the 'outer_loop label and
the labeled break 'outer_loop; are redundant.

This change removes the unused loop label and replaces the labeled break with a
plain break;, simplifying the control flow without changing behavior.

Assignee: nobody → nabeyang
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a6dba4a5db82 https://hg.mozilla.org/integration/autoland/rev/6b240d84d1c7 Redundant 'outer_loop label in selector parser after loop refactoring r=emilio,firefox-style-system-reviewers
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 148 Branch
QA Whiteboard: [qa-triage-done-c149/b148]
You need to log in before you can comment on or make changes to this bug.