Closed Bug 1945463 Opened 28 days ago Closed 20 days ago

[tab groups d&d] Fix greatestOverlap to account for elements completely overlapping one another

Categories

(Firefox :: Tabbed Browser, task, P1)

task
Points:
1

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fidefe-tabgrps-dnd])

Attachments

(1 file)

(In reply to tabmix.onemen from bug 1932489 comment #12)

The comment above greatestOverlap indicate
If the elements have different sizes, then this returns the larger overlap percentage.

but there is a 3rd case that you did not cover

*   p2            p1      p1+s1    p2+s2
*    |             |        |        |
*    ---------------------------------
*    =================================
*                   s2
*                  ==========
*                      s1
*                  ==========
*                   overlap

When element 1 is completely inside element 2 set overlapSize = s1
and the function greatestOverlap should return s1 in this case

Happy to look into this. Just so we're clear, is this a theoretical concern or does it cause problems in practice? If it's the latter, do you have steps to reproduce that problem?

Either way, I assume we'll need this for bug 1908439.

Flags: needinfo?(tabmix.onemen)
Whiteboard: [fidefe-tabgrps-dnd]

I am using css to make each tab shrink to the content of its label.

.tabbrowser-tab:not([pinned]) {
  flex: 0 0 auto !important;
  width: auto !important;
}

it is possible to have tab with minimum width next to a tab with maximum width.

I hope you can modify gBrowser.tabContainer._animateTabMove to handle this use case.

notice that beside the issue explained in bug 1932489 comment #12, the value of tabSize should be (for non vertical mode) the width of the first or last dragging tab according to directionForward and #rtlMode

Flags: needinfo?(tabmix.onemen)
Assignee: nobody → dao+bmo
Pushed by dgottwald@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/bf04cd0bf517 [tab groups d&d] Fix greatestOverlap to account for elements completely overlapping one another. r=jswinarton,tabbrowser-reviewers
Status: NEW → RESOLVED
Closed: 20 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch

(In reply to tabmix.onemen from comment #1)

notice that beside the issue explained in bug 1932489 comment #12, the value of tabSize should be (for non vertical mode) the width of the first or last dragging tab according to directionForward and #rtlMode

The patch in bug 1945788 takes care of this.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: