Closed Bug 1808965 Opened 3 years ago Closed 3 years ago

Stop calling _mouseleave and _mouseenter from _setPositionalAttributes

Categories

(Firefox :: Tabbed Browser, task)

task

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

(Blocks 1 open bug)

Details

(Keywords: perf:frontend)

Attachments

(1 file)

The main reason for calling _mouseleave and _mouseenter from _setPositionalAttributes was to update the beforehovered and afterhovered attributes, as the tabs these attributes were set on might change.

However, bug 1808661 is removing these attributes, so mouseenter and mouseleave events should be sufficient for updating _hoveredTab itself.

_setPositionalAttributes is a hot code-path, so avoiding the expensive querySelector("tab:hover") will improve performance.

Calling _mouseleave and _mouseenter from _setPositionalAttributes used
to be needed to update the beforehovered and afterhovered attributes,
as the tabs these attributes were set on might have changed.

However, bug 1808661 removed these attributes, so mouseenter/mouseleave
events should be sufficient for updating _hoveredTab itself.

_setPositionalAttributes is a hot code-path, so avoiding the expensive
querySelector("tab:hover") will improve performance when having lots of
tabs.

Depends on D166094

Pushed by oriol-bugzilla@hotmail.com: https://hg.mozilla.org/integration/autoland/rev/4be513bf4ccb Stop calling _mouseleave and _mouseenter from _setPositionalAttributes. r=dao
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
Type: enhancement → task
Blocks: 1809465
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: