Closed Bug 1417709 Opened 3 years ago Closed 3 years ago

Invisible -moz-mac-window-titlebar creates an unnecessary webrender image item

Categories

(Core :: Graphics: WebRender, enhancement, P1)

All
macOS
enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wr-reserve])

Attachments

(5 files)

In the Mac window we have an element with -moz-appearance: -moz-window-titlebar underneath the tab bar. The tab bar has -moz-appearance: -moz-mac-vibrancy-dark and blocks out the "titlebar" completely.

With WebRender we don't do any client-side occlusion culling, so we create unnecessary images for covered nsDisplayThemedBackground items. This creates some overhead which we'd like to avoid.

The reason that -moz-appearance: -moz-window-titlebar is set on something invisible is to make double-clicking in the right areas of the window minimize or zoom the window. That's because there's special handling for this -moz-appearance value in nsChildView.mm.

I'm going to create new -moz-appearance values called -moz-mac-vibrant-titlebar-dark and -moz-mac-vibrant-titlebar-light which can be set on the tab bar while also achieving the correct double click behavior.
Priority: -- → P1
Whiteboard: [wr-reserve]
The servo changes are in https://github.com/servo/servo/pull/19255 .
Comment on attachment 8929108 [details]
Bug 1417709 - Change GatherThemeGeometryRegion to GatherVibrantRegion.

https://reviewboard.mozilla.org/r/200400/#review205614

::: commit-message-af42b:2
(Diff revision 1)
> +Bug 1417709 - Change GatherThemeGeometryRegion to GatherVibrantRegion. r?jrmuizel
> +

Why?
Attachment #8929108 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8929110 [details]
Bug 1417709 - Implement -moz-appearance: -moz-mac-vibrant-titlebar-light/dark on macOS.

https://reviewboard.mozilla.org/r/200404/#review205616
Attachment #8929110 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8929109 [details]
Bug 1417709 - Add -moz-appearance: -moz-mac-vibrant-titlebar-light/dark.

https://reviewboard.mozilla.org/r/200402/#review205636
Attachment #8929109 - Flags: review?(emilio) → review+
Comment on attachment 8929111 [details]
Bug 1417709 - Add system colors called "-moz-mac-vibrant-titlebar-light/dark" for use with -moz-font-smoothing-background-color.

https://reviewboard.mozilla.org/r/200406/#review205640
Attachment #8929111 - Flags: review?(emilio) → review+
Comment on attachment 8929112 [details]
Bug 1417709 - Use -moz-appearance: -moz-mac-vibrant-titlebar-dark/light in the Firefox UI.

https://reviewboard.mozilla.org/r/200408/#review205924

Looks good and works for me, thank you!
Attachment #8929112 - Flags: review?(jhofmann) → review+
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/a0fe569c86c0
Change GatherThemeGeometryRegion to GatherVibrantRegion. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/e3a6c5b74595
Add -moz-appearance: -moz-mac-vibrant-titlebar-light/dark. r=emilio
https://hg.mozilla.org/integration/autoland/rev/29e6c0d82193
Implement -moz-appearance: -moz-mac-vibrant-titlebar-light/dark on macOS. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/50f0febe43a0
Add system colors called "-moz-mac-vibrant-titlebar-light/dark" for use with -moz-font-smoothing-background-color. r=emilio
https://hg.mozilla.org/integration/autoland/rev/5670c9582add
Use -moz-appearance: -moz-mac-vibrant-titlebar-dark/light in the Firefox UI. r=johannh
Oh no :(

I forgot to regenerate the devtools property database...

This backout is probably also going to trip up the servo sync bot.
(In reply to Markus Stange [:mstange] from comment #20)
> Oh no :(
> 
> I forgot to regenerate the devtools property database...
> 
> This backout is probably also going to trip up the servo sync bot.

Yeah... It would've been nice to not back it out directly, but asking on IRC.

Too late now I guess, oh well :(
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/86505eb29b2c
Change GatherThemeGeometryRegion to GatherVibrantRegion. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/2957fe3b0d53
Add -moz-appearance: -moz-mac-vibrant-titlebar-light/dark. r=emilio
https://hg.mozilla.org/integration/autoland/rev/77ef4df9b8df
Implement -moz-appearance: -moz-mac-vibrant-titlebar-light/dark on macOS. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/000e6eab5b25
Add system colors called "-moz-mac-vibrant-titlebar-light/dark" for use with -moz-font-smoothing-background-color. r=emilio
https://hg.mozilla.org/integration/autoland/rev/42ca009ff87f
Use -moz-appearance: -moz-mac-vibrant-titlebar-dark/light in the Firefox UI. r=johannh
Flags: needinfo?(mstange)
You need to log in before you can comment on or make changes to this bug.