Closed Bug 1580003 Opened 6 years ago Closed 5 years ago

Remove isLastMultiSelectChange parameter

Categories

(Firefox :: Tabbed Browser, task, P3)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

Attachments

(1 file)

When a tab is added or removed from the multiselection, we need to update positional attributes. However, when multiple tabs are added or removed simultaneously, we only want to do that at the end, after the last change.

Currently this is done with the isLastMultiSelectChange parameter. However, this is not much reliable: imagine a function A that performs various addToMultiSelectedTabs calls. It can set isLastMultiSelectChange = false for all calls except the last one. However, A could be called by another function B, which could also alter the multiselection! So if we want to do it properly, we should add this isLastMultiSelectChange parameter to any function which could end up calling another function with a isLastMultiSelectChange parameter. But that's infectious and ugly.

I think we can do better. I already implemented a TabMultiSelect event that fires after the multiselection changes. This machinery could be reused for updating the positional attributes. The only difference will be that this will happen asynchronously after a tick. But I think that's fine.

Priority: -- → P3
Pushed by smolnar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/81be428b9df0 Remove isLastMultiSelectChange parameter. r=Gijs
Flags: needinfo?(oriol-bugzilla)
Pushed by apavel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/004b30cb520e Remove isLastMultiSelectChange parameter. r=Gijs
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
Flags: needinfo?(oriol-bugzilla)
Blocks: 1691480
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: