Blur the background of arrow panels

NEW
Unassigned

Status

()

P3
normal
2 years ago
a year ago

People

(Reporter: dao, Unassigned)

Tracking

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

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [tpi:+])

Attachments

(2 attachments)

(Reporter)

Description

2 years 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)
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.
(Reporter)

Comment 4

2 years 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

2 years ago
Duplicate of this bug: 940797
(Reporter)

Updated

2 years ago
Whiteboard: [photon]

Updated

2 years ago
Priority: -- → P1
Whiteboard: [photon] → [photon][tpi:+]
(Reporter)

Updated

2 years ago
Whiteboard: [photon][tpi:+] → [tpi:+][photon-visual]

Updated

2 years ago
Flags: qe-verify-
Priority: P1 → P2
(Reporter)

Updated

2 years ago
Whiteboard: [tpi:+][photon-visual] → [photon-visual][p1][tpi:+]
Assignee: nobody → mstange
Status: NEW → ASSIGNED
Priority: P2 → P1
Depends on: 1370040
Created attachment 8879297 [details]
wip screenshot
Created attachment 8879305 [details]
panel-subview.mov
Whiteboard: [photon-visual][p1][tpi:+] → [reserve-photon-visual][p1][tpi:+]

Updated

a year ago
Assignee: mstange → nobody
Status: ASSIGNED → NEW
Keywords: stale-bug
Priority: P1 → P2
Priority: P2 → P3
(Reporter)

Updated

a year ago
No longer blocks: 1325171
Whiteboard: [reserve-photon-visual][p1][tpi:+] → [tpi:+]
You need to log in before you can comment on or make changes to this bug.