Closed Bug 1837174 Opened 1 years ago Closed 1 years ago

Replace [first-visible-unpinned-tab] selector with :nth-child and get rid of _setPositionalAttributes

Categories

(Firefox :: Tabbed Browser, task)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 3 open bugs)

Details

(Keywords: perf)

Attachments

(2 files)

.tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) should work instead of .tabbrowser-tab[first-visible-unpinned-tab], allowing us to finally get rid of _setPositionalAttributes.

Duplicate of this bug: 1760461
Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED

Do we need that first-visible-unpinned-tab at all? It's only used to add an extra hard-coded margin between the pinned and unpinned tabs, can't we just account for that extra space in _positionPinnedTabs?

If not, we should probably remove the pref for :nth-child(... of), if the front-end is going to start relying on it.

Flags: needinfo?(dao+bmo)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #3)

Do we need that first-visible-unpinned-tab at all? It's only used to add an extra hard-coded margin between the pinned and unpinned tabs, can't we just account for that extra space in _positionPinnedTabs?

_positionPinnedTabs only does its thing when tabs overflow, otherwise pinned tabs are static in the tab strip like normal tabs, and that's when we want this gap.

If not, we should probably remove the pref for :nth-child(... of), if the front-end is going to start relying on it.

To be clear, it's enabled by default, right? So yeah, removing the pref might be a good idea, although in this particular case things won't fall apart with the pref disabled, the gap just won't be there.

Flags: needinfo?(dao+bmo) → needinfo?(emilio)

Yeah, it's enabled by default.

Flags: needinfo?(emilio)

We ship this, and the front-end uses it by default, so remove the pref.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/be5691b57b4a Remove :nth-child(... of) pref. r=zrhoffman
Keywords: leave-open
Pushed by dgottwald@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/71539667f4c9 Replace [first-visible-unpinned-tab] selector with :nth-child and get rid of _setPositionalAttributes. r=Gijs
Keywords: leave-open
Blocks: 1808719
Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Blocks: 1849905
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: