Closed Bug 1121723 Opened 9 years ago Closed 9 years ago

DevEdition theme: tab bar jittering when in customize mode that is not the last tab

Categories

(DevTools :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(firefox38 fixed)

RESOLVED FIXED
Firefox 38
Tracking Status
firefox38 --- fixed

People

(Reporter: bgrins, Assigned: bgrins)

References

Details

(Whiteboard: [devedition-polish])

Attachments

(2 files, 2 obsolete files)

I've been able to reproduce on OSX.

STR:

Open up enough tabs to overflow
Open customize mode
Press cmd+t to open a new tab so the customize tab isn't the last
Switch to customize tab

Jittering starts while in customize mode and continues until exiting.
I've noticed that removing the "#TabsToolbar[currentset]:not([currentset*="tabbrowser-tabs,new-tab-button"])" portion of the selector here seems to fix the problem: https://dxr.mozilla.org/mozilla-central/source/browser/themes/shared/tabs.inc.css#327.

That selector is intended to handle the case with a separated new tab button, but doesn't match in customize mode.
Whiteboard: [devedition-polish]
Attached patch jittering-customize.patch (obsolete) — Splinter Review
A different approach than outlined in Comment 1 - this just switches the separators to only be 1px wide and margin-start -1px so that we don't have the issue with extending the width of the final tab.  I can't find anything specifically expecting this to be 3px in tabbrowser or anywhere else, but let me know if you think changing this width is likely to be a problem.

This also lets us remove the ugly workaround from Bug 1111091 dealing with a separated new tab button.
Assignee: nobody → bgrinstead
Status: NEW → ASSIGNED
Attachment #8556768 - Flags: review?(MattN+bmo)
Blocks: 1093820
Comment on attachment 8556768 [details] [diff] [review]
jittering-customize.patch

Review of attachment 8556768 [details] [diff] [review]:
-----------------------------------------------------------------

Outside dev-edition the image is 3px wide but other than that I can't think of other reliance on 3px.

I think the changes to devedition.inc.css are fine but I thought that the code you're deleting in tabs.inc.css could be useful outside of devedition? Am I remembering incorrectly? I don't think it was a problem without extensions though and we lived with that for months until you added the hunk recently so I think it's not a big deal either way.
Attachment #8556768 - Flags: review?(MattN+bmo) → review+
(In reply to Matthew N. [:MattN] from comment #3)
> I think the changes to devedition.inc.css are fine but I thought that the
> code you're deleting in tabs.inc.css could be useful outside of devedition?
> Am I remembering incorrectly? I don't think it was a problem without
> extensions though and we lived with that for months until you added the hunk
> recently so I think it's not a big deal either way.

I believe this was only an issue with tabCurveWidth < 2px - I've never seen the jitter without the devedition theme applied.

When debugging it I set @tabCurveWidth@/@tabCurveHalfWidth@ to 0px on the default theme and was able to reproduce and narrow down the problem to this instead of something else within the devedition theme, so maybe that is what you are thinking of.
Perhaps. This is something add-ons could do though.
(In reply to Matthew N. [:MattN] from comment #5)
> Perhaps. This is something add-ons could do though.

Are they able to change the preprocessor values?
No, but they could override the values like dev edition does.
Turns out this causes the first separator to be invisible in the case of overflowing tabs with at least one pinned tab (see screenshot).  It seems that switching the -moz-margin-start and -moz-margin end values fixes this problem, but I'm not sure if this is going to cause different issues.
Attached patch jittering-customize2.patch (obsolete) — Splinter Review
This fixes the problem in Comment 8 and also fixes the original issue, but I'm not sure if it is the right approach.  I'm thinking the difference is just that the separator shows up on the right side of the edge of the tab instead of the left.
Attachment #8558209 - Flags: review?(MattN+bmo)
(In reply to Brian Grinstead [:bgrins] from comment #9)
> Created attachment 8558209 [details] [diff] [review]
> jittering-customize2.patch
> 
> This fixes the problem in Comment 8 and also fixes the original issue, but
> I'm not sure if it is the right approach.  I'm thinking the difference is
> just that the separator shows up on the right side of the edge of the tab
> instead of the left.

I guess an alternative would be to use `moz-margin-start: -1px; -moz-margin-end: 0;` for the last tab (to make sure that the width of the last tab isn't extended) and then `moz-margin-start: 0; -moz-margin-end: -1px;` for all the others (so that the first separator issue in Comment 8 is resolved).
Uses approach from Comment 10
Attachment #8556768 - Attachment is obsolete: true
Attachment #8558209 - Attachment is obsolete: true
Attachment #8558209 - Flags: review?(MattN+bmo)
Attachment #8560701 - Flags: review?(MattN+bmo)
Attachment #8560701 - Flags: review?(MattN+bmo) → review+
https://hg.mozilla.org/integration/fx-team/rev/ee8d92893082
Whiteboard: [devedition-polish] → [fixed-in-fx-team][devedition-polish]
https://hg.mozilla.org/mozilla-central/rev/ee8d92893082
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team][devedition-polish] → [devedition-polish]
Target Milestone: --- → Firefox 38
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: