Open Bug 1348294 Opened 7 years ago Updated 2 years ago

Blur the background of arrow panels

Categories

(Core :: Widget: Cocoa, enhancement, P3)

Unspecified
macOS
enhancement

Tracking

()

People

(Reporter: dao, Unassigned)

References

Details

(Whiteboard: [tpi:+])

Attachments

(2 files)

Bug 498258 implemented the background blur for standard menus. Our arrow panels however don't use the native appearance, so they don't get the same treatment.

Markus, do you think we can somehow build on bug 498258 and let arrow panels get the same treatment?

Not sure if there are alternatives. As I understand it, blurring in the front-end with CSS filter: blur() isn't going to work here, and even if it did I suspect it would be a non-starter performance-wise.
Flags: needinfo?(mstange)
Correct on all counts.

My idea for this was to build on bug 1291457 and let the widget compute the panel arrow shape. Widget needs to know the location of the arrow anyway, so that the transform animation can be anchored around the arrow tip, so once it has that information we can hardcode the arrow size and then the whole shape is known to widget. It can then use that shape to compute a nine-part image in -[BaseWindow _cornerMask] at http://searchfox.org/mozilla-central/rev/006005beff40d377cfd2f69d3400633c5ff09127/widget/cocoa/nsCocoaWindow.mm#2833 . This mask will cause the system to draw the right shadow, and to mask the window background blur to the right shape.

The current patches in bug 1291457 use the transform-origin property as a means to communicate the arrow tip's location to the widget. That is a bit hackish. Do you have any other ideas for how to communicate that information to widget? Short of adding a new CSS property for this ("panel-arrow-location"), which I'd really like to avoid...
One thing I thought of was to add -moz-appearance: panel-arrow. I'm not sure why I rejected that idea when I last looked at this, it sounds fine to me now.
I suppose the widget also needs to look at the panel's "side" attribute to know which way the arrow is pointing.
Flags: needinfo?(mstange)
Or it could just assume that the the arrow should always point towards the panel edge that's closest to the longest edge of the arrow's bounding box.
This bug is a duplicate of bug 940797, btw.
(In reply to Markus Stange [:mstange] from comment #1)
> The current patches in bug 1291457 use the transform-origin property as a
> means to communicate the arrow tip's location to the widget. That is a bit
> hackish. Do you have any other ideas for how to communicate that information
> to widget? Short of adding a new CSS property for this
> ("panel-arrow-location"), which I'd really like to avoid...
> One thing I thought of was to add -moz-appearance: panel-arrow. I'm not sure
> why I rejected that idea when I last looked at this, it sounds fine to me
> now.

I believe nsMenuPopupFrame also knows the arrow's position. I guess that might be a better place for widget code to communicate with. Neil Deakin would know more about this.

(In reply to Markus Stange [:mstange] from comment #3)
> This bug is a duplicate of bug 940797, btw.

I was sure we already had a bug for this but couldn't find it. Thanks. I'll mark that bug a duplicate of this one since at this point this bug has a more useful summary of the current situation.
Depends on: 1291457
Whiteboard: [photon]
Priority: -- → P1
Whiteboard: [photon] → [photon][tpi:+]
Whiteboard: [photon][tpi:+] → [tpi:+][photon-visual]
Flags: qe-verify-
Priority: P1 → P2
Whiteboard: [tpi:+][photon-visual] → [photon-visual][p1][tpi:+]
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Priority: P2 → P1
Depends on: 1370040
Attached image wip screenshot
Whiteboard: [photon-visual][p1][tpi:+] → [reserve-photon-visual][p1][tpi:+]
Assignee: mstange → nobody
Status: ASSIGNED → NEW
Keywords: stale-bug
Priority: P1 → P2
Priority: P2 → P3
No longer blocks: photon-visual
Whiteboard: [reserve-photon-visual][p1][tpi:+] → [tpi:+]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: