Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "noreferrer" for window.open() #4331

Merged
merged 2 commits into from
Feb 12, 2019
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Feb 1, 2019

And cleanup handling of "noreferrer" keyword when following hyperlinks.

Tests: ...

Fixes #4111.


/links.html ( diff )
/window-object.html ( diff )

@annevk
Copy link
Member Author

annevk commented Feb 1, 2019

I'm pretty sure I've seen @cdumez and also @ehsan / @bakulf express interest for this in the past. It makes sense to support noreferrer as a convenience throughout, with the same semantics as noopener.

@annevk annevk added addition/proposal New features or enhancements topic: frames/navigables/browsing contexts impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation labels Feb 1, 2019
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but it would be quite nice if this were separate commits: one for the cleanup to properly include noreferrer in the link processing model, and one for the new feature added to window.open().

source Outdated Show resolved Hide resolved
source Outdated Show resolved Hide resolved
@annevk annevk force-pushed the annevk/window-open-noreferrer branch from 651bb0b to b35bef8 Compare February 4, 2019 10:26
@annevk
Copy link
Member Author

annevk commented Feb 7, 2019

Splitting in commits has happened. Still needed:

  • Tests
  • Browser bugs

@annevk annevk force-pushed the annevk/window-open-noreferrer branch from b35bef8 to aaf69cb Compare February 11, 2019 10:21
@annevk
Copy link
Member Author

annevk commented Feb 11, 2019

I've amended the commits to place the note before the example and hide it from the developer edition.

@annevk
Copy link
Member Author

annevk commented Feb 11, 2019

@zcorpan @cdumez thoughts as to how to best test this? I've found html/browsers/the-window-object/window-open-noopener.html and html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html thus far and both seem hard to generalize. I could copypasta them, but that doesn't seem great?

@zcorpan
Copy link
Member

zcorpan commented Feb 11, 2019

Hmmm. Boolean features should parse the same. Maybe have a common .js file with a function that you pass the URL to open, the feature name to be tested (to be mangled), and a callback to check the result?

annevk added a commit to web-platform-tests/wpt that referenced this pull request Feb 12, 2019
@annevk
Copy link
Member Author

annevk commented Feb 12, 2019

Thanks, that was more work than I wanted to do, but probably for the better: web-platform-tests/wpt#15352.

@annevk annevk force-pushed the annevk/window-open-noreferrer branch from aaf69cb to a6b3d9a Compare February 12, 2019 12:51
@annevk annevk merged commit a9a7944 into master Feb 12, 2019
@annevk annevk deleted the annevk/window-open-noreferrer branch February 12, 2019 12:54
@annevk
Copy link
Member Author

annevk commented Feb 12, 2019

cc @whatwg/documentation

annevk added a commit to web-platform-tests/wpt that referenced this pull request Feb 26, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 15, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352
mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Mar 16, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 16, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352
mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Mar 17, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352
imran1008 pushed a commit to bloomberg/chromium.bb that referenced this pull request May 21, 2019
This change is following specs below.
1) whatwg/html#4331
2) https://html.spec.whatwg.org/multipage/window-object.html

And this CL includes the behavior change below.

When noreferrer is specified,
the created window is not shown in app popup form.
This behavior matches with Chromium
and Firefox's handling way for "noopener".

Bug: 931207
Change-Id: Ia1c8f99dc6936952cc70bfa21d1eece741b7edcc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1541376
Reviewed-by: Kent Tamura <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Hayato Ito <[email protected]>
Commit-Queue: Joonghun Park <[email protected]>
Cr-Commit-Position: refs/heads/master@{#652063}
Former-commit-id: efb60af1f7facfc5c4cb2ea955e7c1e781a3d15e
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 23, 2019
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352

UltraBlame original commit: 5c6bfad36ca045e19786e7eb97104d31a04d81fd
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352

UltraBlame original commit: 154f3e3e9fc6ad51a59f20321925a6bcbc14a6d8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352

UltraBlame original commit: 5c6bfad36ca045e19786e7eb97104d31a04d81fd
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352

UltraBlame original commit: 154f3e3e9fc6ad51a59f20321925a6bcbc14a6d8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352

UltraBlame original commit: 5c6bfad36ca045e19786e7eb97104d31a04d81fd
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
… a=testonly

Automatic update from web-platform-tests
HTML: window.open("", "", "noreferrer")

For whatwg/html#4331.
--

wpt-commits: 22abb9c5c4a78f5deecc49417f5e57ba27f404cb
wpt-pr: 15352

UltraBlame original commit: 154f3e3e9fc6ad51a59f20321925a6bcbc14a6d8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation topic: frames/navigables/browsing contexts
Development

Successfully merging this pull request may close these issues.

3 participants