Closed Bug 1606839 Opened 5 years ago Closed 5 years ago

Use new user activation API for notification permission dialog

Categories

(Core :: DOM: Push Subscriptions, task, P1)

task

Tracking

()

VERIFIED FIXED
mozilla74
Tracking Status
firefox73 + verified
firefox74 + verified

People

(Reporter: annevk, Assigned: johannh)

References

Details

Attachments

(1 file)

As Edgar wrote in bug 1591718 comment 11:

I expect that replacing the UserActivation::IsHandlingUserInput() call in ContentPermissionRequestBase with new API in the document should just work.

This would likely fix an active regression on twitter.com (please verify), maybe elsewhere, and is in general a thing we want to be doing.

This probably does not warrant an intent to ship, if indeed it's as straightforward as it seems.

Flags: needinfo?(jhofmann)
Assignee: nobody → jhofmann
Status: NEW → ASSIGNED
Flags: needinfo?(jhofmann)
Priority: -- → P1
Pushed by jhofmann@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/209adca8625c Use new user activation API for guarding notification permission prompts. r=edgar
Backout by aiakab@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/488a0a910f01 Backed out changeset 209adca8625c for multiple failures on browser_permissions_handling_user_input.js

Edgar, I would have expected E10SUtils.wrapHandlingUserInput to set UserActivation::IsHandlingUserInput() like it does with isHandlingUserInput but it seems like that's not the case yet. Is there already a mechanism to artificially set user activation for tests or would you like me to add one?

Flags: needinfo?(jhofmann) → needinfo?(echen)

(In reply to Johann Hofmann [:johannh] from comment #5)

Is there already a mechanism to artificially set user activation for tests or would you like me to add one?

There is a chrome only api in document, you could use it to set user activation for tests.

Flags: needinfo?(echen)

Ah, thanks!

Attachment #9119765 - Attachment description: Bug 1606839 - Use new user activation API for guarding notification permission prompts. r=Ehsan → Bug 1606839 - Use new user activation API for guarding notification permission prompts. r=edgar
Attachment #9119765 - Attachment description: Bug 1606839 - Use new user activation API for guarding notification permission prompts. r=edgar → Bug 1606839 - Use new user activation API for guarding notification permission prompts. r=edgar,Ehsan
Pushed by jhofmann@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d48d8dbcbbea Use new user activation API for guarding notification permission prompts. r=Ehsan,edgar
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74

Comment on attachment 9119765 [details]
Bug 1606839 - Use new user activation API for guarding notification permission prompts. r=edgar,Ehsan

Beta/Release Uplift Approval Request

  • User impact if declined: Well-meaning sites which fail to capture user interaction correctly do not get the more prominent notification permission prompts, e.g. twitter.com
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See bug 1591718
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is a simple change that simply loosens some restrictions around notification prompting, with tests.
  • String changes made/needed: None
Attachment #9119765 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9119765 [details]
Bug 1606839 - Use new user activation API for guarding notification permission prompts. r=edgar,Ehsan

Fixes a regression causing some push notification prompts to not appear on popular sites like Twitter. Approved for 73.0b7.

Attachment #9119765 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Reproduced the initial issue using release version 72.0.1
Verified - Fixed in latest Beta build 73.0b7 (Build id: 20200118195856) and latest Nightly build 74.0a1 (Build id: 20200119213718) using Windows 10, Ubuntu 18.04 and Mac OS 10.15

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: