Remove isLastMultiSelectChange parameter
Categories
(Firefox :: Tabbed Browser, task, P3)
Tracking
()
| 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.
| Assignee | ||
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Comment 3•5 years ago
|
||
Backed out for bc failures on browser_multiselect_tabs_close_other_tabs.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/6af9d2a4772eb0c1e6686e35bb56fe592907bc81
Log link: https://treeherder.mozilla.org/logviewer?job_id=326714820&repo=autoland&lineNumber=2488
Comment 5•5 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•5 years ago
|
Description
•