Closed Bug 790567 Opened 12 years ago Closed 4 years ago

Implement responsive OMTA tab strip

Categories

(Firefox :: Tabbed Browser, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: BenWa, Unassigned)

References

(Depends on 2 open bugs)

Details

Attachments

(1 file)

As discussing during the perf week if we redesign the tab strip to use OMTA we can get a responsive tab strip.

Note that we may have to compromise on how the tab animation work since we can't reflow or update text. For example we can't correctly resize text with ellipses with OMTA. We do have enough flexibility on how we can layerize the tab strip to get decent animations. In the worse case scenario I think implementing a custom OMTA should be an option of last resort.
The tab bar layout likely is too flexible (e.g. scrolling, resizing tabs) to completely avoid reflows. I don't see us dump any of this behavior for the sake of smoother animations. We need both the correct, desired behavior and smoothness.

In order to avoid unnecessary invalidation in cases where closing a tab /doesn't/ scroll or resize other tabs, basically what I think we need is DLBI and maybe bug 753559 if DLBI doesn't work for -moz-box-flex.
Attached file TabStrip Prototype
On Mac set the following prefs:
layers.offmainthreadcomposition.enabled;true
layers.offmainthreadcomposition.animate-transform;true
layers.offmainthreadcomposition.animate-opacity;true

Use the GIF animation as a gauge of responsiveness.
(In reply to Dão Gottwald [:dao] from comment #1)
> The tab bar layout likely is too flexible (e.g. scrolling, resizing tabs) to
> completely avoid reflows. I don't see us dump any of this behavior for the
> sake of smoother animations. We need both the correct, desired behavior and
> smoothness.
> 

That's a valid concern but I think it's worth investigating and prototyping this feature to see if we can get something that look correct.

> In order to avoid unnecessary invalidation in cases where closing a tab
> /doesn't/ scroll or resize other tabs, basically what I think we need is
> DLBI and maybe bug 753559 if DLBI doesn't work for -moz-box-flex.

The problem isn't doing too much work for the tabstrip. It's other task causing main thread contention. Optimizing the tab strip wont fix that.
Depends on: 790582
(In reply to Benoit Girard (:BenWa) from comment #3)
> (In reply to Dão Gottwald [:dao] from comment #1)
> > The tab bar layout likely is too flexible (e.g. scrolling, resizing tabs) to
> > completely avoid reflows. I don't see us dump any of this behavior for the
> > sake of smoother animations. We need both the correct, desired behavior and
> > smoothness.
> 
> That's a valid concern but I think it's worth investigating and prototyping
> this feature to see if we can get something that look correct.

Sure, I'm happy to be surprised. Just gently warning you that it may not work out...

> > In order to avoid unnecessary invalidation in cases where closing a tab
> > /doesn't/ scroll or resize other tabs, basically what I think we need is
> > DLBI and maybe bug 753559 if DLBI doesn't work for -moz-box-flex.
> 
> The problem isn't doing too much work for the tabstrip. It's other task
> causing main thread contention. Optimizing the tab strip wont fix that.

Yeah, but this hits us all over the place, not just when animating tabs. Reminds me of bug 712478. No visible activity there lately...
Depends on: 790592
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: