Closed Bug 1420375 Opened 7 years ago Closed 6 years ago

During navigation, carry the user-activation flag of present document to a new document if they're in the same eTLD

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

Other Branch
enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: alwu, Unassigned)

References

Details

(Whiteboard: [block-ap-v1])

Attachments

(3 files)

In bug1415444, we implemented the flag which stores whether user has activated the document by specific user gestures. When navigating to new document, the flag should be carried if the new document has same eTLD+1. 

One example is, 
1. User login on siteA (user activates siteA)
2. site automatically jump to another siteB after login success (siteB is not activated yet)

For siteB, we should still regard it as activated, to keep the broswering experience consistent.
Priority: -- → P3
Summary: During navigation, carry the flag of previous document to a new document with same eTLD + 1 → During navigation, carry the user-activation flag of present document to a new document if they're in the same eTLD
Comment on attachment 8932820 [details]
Bug 1420375 - propagate user-activation flag to new document with same eTLD.

Hi, smaug,
I'm not sure whether this is a proper way, could you give me some feedback?
(I'll also add a test later)
Thanks!
Attachment #8932820 - Flags: feedback?(bugs)
Comment on attachment 8932820 [details]
Bug 1420375 - propagate user-activation flag to new document with same eTLD.

https://reviewboard.mozilla.org/r/203864/#review210612

::: docshell/base/nsDocShell.cpp:8404
(Diff revision 1)
> +  if (!aOldDoc->HasBeenUserActivated()) {
> +    return;
> +  }
> +
> +  // make sure the URL of both documents are in the same eTLD
> +  if (!nsContentUtils::IsSameBaseDomain(aOldDoc->GetDocumentURI(),

Comparing document uris isn't quite right. One could navigate to an about:blank or data:url or such, yet the domain would stay the same. You probably want to compare the URIs of the documents' principal
Comment on attachment 8932820 [details]
Bug 1420375 - propagate user-activation flag to new document with same eTLD.

And this kind of feature needs quite a few tests.
Attachment #8932820 - Flags: feedback?(bugs)
Whiteboard: block-ap-v1
Depends on: 1430544
Whiteboard: block-ap-v1 → [block-ap-v1]
Assignee: alastor0325 → nobody
We decided to not do this.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: