Closed Bug 1616000 Opened 4 years ago Closed 4 years ago

Push notification are no longer displayed

Categories

(Core :: Widget: Win32, defect, P1)

75 Branch
Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
mozilla75
Tracking Status
firefox-esr68 --- unaffected
firefox73 --- unaffected
firefox74 --- unaffected
firefox75 --- verified

People

(Reporter: atrif, Assigned: cmartin)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image push_notification.gif

Affected versions

  • 75.0a1 (20200216210001)

Affected platforms

  • Windows 10x64

Steps to reproduce

  1. Open Firefox and go to https://serviceworke.rs/push-payload_demo.html.
  2. Click on “Allow notifications” and “Request sending a notification!” button.
  3. Alternatively, go to about:debugging#/runtime/this-firefox and click on the “Push” button for the loaded service worker webpage.

Expected result

  • For step 2 a notification is displayed after 5 seconds.
  • For step 3 a notification is displayed after pressing push.

Actual result

  • Nothing happens on neither of the steps.

Regression Range

Notes

  • I can’t reproduce the issue on macOS 10.15 or Ubuntu 18.04.
  • Attached a screen recording.

:sgiesecke, can you please have a look at this? It is a tracked regression for 75. Thank you!

Flags: needinfo?(sgiesecke)

Chris, the regression range points to the patches of Bug 1604412 you authored. Could you check this, please?

Flags: needinfo?(sgiesecke) → needinfo?(cmartin)
Assignee: nobody → cmartin
Severity: normal → blocker
Priority: -- → P1
Component: DOM: Push Notifications → Widget: Win32

I've figured out the root issue - The way transparency is handled between parent and child windows is causing my patch to use the wrong API (UpdateLayeredWindow) instead of BitBlt on a window that isn't transparent.

The fix should be pretty straightforward. I will test it tomorrow.

Flags: needinfo?(cmartin)

Bug 1604412 enabled "remote backbuffer" compositing when using non-accelerated
layers. However, due to my misunderstanding of how nWindow and compositing
handles layered windows, I broke the usecase where a child window is
transparent.

In this case, it is the top-level anscestor window that has the
WS_EX_LAYERED attribute and not the child window. The ancestor is the one
that needs to be repainted when a present is requested.

Just to add to my analysis: The reason that I was using UpdateLayeredWindow() on a window that wasn't layered is because I apparently didn't understand how child windows and layering mix in our code.

When a child window is made transparent, the WS_EX_LAYERED attribute is applied to the top-level window that owns the child window and not the child window itself.

So, I had to change the code to call UpdateLayeredWindow() on the child's ancestor if the child believes itself to be transparent, not the child.

Pushed by cmartin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d69f53c5968c
Fix broken push notifications r=handyman
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Has Regression Range: --- → yes
Has STR: --- → yes
Flags: qe-verify+
Flags: needinfo?(alexandru.trif)
QA Contact: alexandru.trif

Verified using Firefox 75.0b4 (20200313173516) on Windows 10x64. The notifications are correctly shown.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: needinfo?(alexandru.trif)

I do not know if the cause is the same but in the latest Nightly (build from 03.18.2020) the push desktop notifications are no longer appearing.

Mic, please create a new bug and CC me. Thank you in advance.

You need to log in before you can comment on or make changes to this bug.