Blur the background of arrow panels

ASSIGNED
Assigned to

Status

()

Core
Widget: Cocoa
P1
normal
ASSIGNED
5 months ago
13 days ago

People

(Reporter: dao, Assigned: mstange)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

Trunk
Unspecified
Mac OS X
Points:
---
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [reserve-photon-visual][p1][tpi:+])

Attachments

(2 attachments)

(Reporter)

Description

5 months ago
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)
(Assignee)

Comment 1

5 months ago
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)
(Assignee)

Comment 2

5 months ago
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.
(Assignee)

Comment 3

5 months ago
This bug is a duplicate of bug 940797, btw.
(Reporter)

Comment 4

5 months ago
(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
(Reporter)

Updated

5 months ago
Duplicate of this bug: 940797
(Reporter)

Updated

5 months ago
Whiteboard: [photon]

Updated

5 months ago
Priority: -- → P1
Whiteboard: [photon] → [photon][tpi:+]
(Reporter)

Updated

4 months ago
Whiteboard: [photon][tpi:+] → [tpi:+][photon-visual]

Updated

4 months ago
Flags: qe-verify-
Priority: P1 → P2
(Reporter)

Updated

4 months ago
Whiteboard: [tpi:+][photon-visual] → [photon-visual][p1][tpi:+]
(Assignee)

Updated

2 months ago
Assignee: nobody → mstange
Status: NEW → ASSIGNED

Updated

2 months ago
Priority: P2 → P1
(Assignee)

Updated

2 months ago
Depends on: 1370040
(Assignee)

Comment 6

2 months ago
Created attachment 8879297 [details]
wip screenshot
(Assignee)

Comment 7

2 months ago
Created attachment 8879305 [details]
panel-subview.mov

Updated

16 days ago
Whiteboard: [photon-visual][p1][tpi:+] → [reserve-photon-visual][p1][tpi:+]
You need to log in before you can comment on or make changes to this bug.