Skip to content

Make 'true' a truthy value for window.open boolean features #7425

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

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

@zcorpan zcorpan added needs tests Moving the issue forward requires someone to write tests impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation labels Dec 17, 2021
@zcorpan
Copy link
Member Author

zcorpan commented Dec 17, 2021

(impacts documentation label for https://developer.mozilla.org/en-US/docs/Web/API/Window/open#window_features )

Copy link
Contributor

@mfreed7 mfreed7 left a comment

Choose a reason for hiding this comment

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

LGTM!

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 2, 2022
Prior to this CL, window.open(url, '', 'noopener=true') would treat
'noopener=true' as if noopener is false. This is currently per-spec [1]
but there is a desire [2][3] to change that.

[1] https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-parse-boolean
[2] whatwg/html#7425
[3] whatwg/html#7399

Fixed: 1277613
Change-Id: I5b3a7e985a9bb392c2150846b50369cfcd9b05fa
@arai-a
Copy link
Contributor

arai-a commented Mar 3, 2022

Filed https://bugzilla.mozilla.org/show_bug.cgi?id=1757969 for Firefox, and I'm working on it

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 3, 2022
Prior to this CL, window.open(url, '', 'noopener=true') would treat
'noopener=true' as if noopener is false. This is currently per-spec [1]
but there is a desire [2][3] to change that.

[1] https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-parse-boolean
[2] whatwg/html#7425
[3] whatwg/html#7399

Fixed: 1277613
Change-Id: I5b3a7e985a9bb392c2150846b50369cfcd9b05fa
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 3, 2022
Prior to this CL, window.open(url, '', 'noopener=true') would treat
'noopener=true' as if noopener is false. This is currently per-spec [1]
but there is a desire [2][3] to change that.

The I2S is here:
https://groups.google.com/a/chromium.org/g/blink-dev/c/ePJ4GE6VzVc/m/urs3-4rHDAAJ

[1] https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-parse-boolean
[2] whatwg/html#7425
[3] whatwg/html#7399

Fixed: 1277613
Change-Id: I5b3a7e985a9bb392c2150846b50369cfcd9b05fa
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 4, 2022
Prior to this CL, window.open(url, '', 'noopener=true') would treat
'noopener=true' as if noopener is false. This is currently per-spec [1]
but there is a desire [2][3] to change that.

The I2S is here:
https://groups.google.com/a/chromium.org/g/blink-dev/c/ePJ4GE6VzVc/m/urs3-4rHDAAJ

[1] https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-parse-boolean
[2] whatwg/html#7425
[3] whatwg/html#7399

Fixed: 1277613
Change-Id: I5b3a7e985a9bb392c2150846b50369cfcd9b05fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3495659
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#977722}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 4, 2022
Prior to this CL, window.open(url, '', 'noopener=true') would treat
'noopener=true' as if noopener is false. This is currently per-spec [1]
but there is a desire [2][3] to change that.

The I2S is here:
https://groups.google.com/a/chromium.org/g/blink-dev/c/ePJ4GE6VzVc/m/urs3-4rHDAAJ

[1] https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-parse-boolean
[2] whatwg/html#7425
[3] whatwg/html#7399

Fixed: 1277613
Change-Id: I5b3a7e985a9bb392c2150846b50369cfcd9b05fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3495659
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#977722}
@mfreed7
Copy link
Contributor

mfreed7 commented Mar 4, 2022

Ok, tests have landed, and I've shipped the feature in Chromium (M101). Can we land this spec change now? I believe we have Gecko and WebKit support.

@domenic domenic added addition/proposal New features or enhancements and removed needs tests Moving the issue forward requires someone to write tests labels Mar 7, 2022
@domenic domenic merged commit ca752b0 into main Mar 7, 2022
@domenic domenic deleted the bocoup/windowfeatures-true branch March 7, 2022 14:56
@domenic
Copy link
Member

domenic commented Mar 7, 2022

Merged and filed a bug for WebKit. Yay! Also thanks for working on the extra tests about the value space; they seem nice and comprehensive.

webkit-commit-queue pushed a commit to WebKit/WebKit that referenced this pull request Mar 7, 2022
https://bugs.webkit.org/show_bug.cgi?id=237530

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Import WPT test coverage.

* resources/resource-files.json:
* web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-is-popup-condition.html:
* web-platform-tests/html/browsers/the-window-object/support/w3c-import.log:
* web-platform-tests/html/browsers/the-window-object/support/windowFeature-values-target.html: Added.
* web-platform-tests/html/browsers/the-window-object/w3c-import.log:
* web-platform-tests/html/browsers/the-window-object/window-open-noopener.html:
* web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values-expected.txt: Added.
* web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html: Added.

Source/WebCore:

Make "true" count as truthy in window.open()'s boolean features, as per:
- whatwg/html#7425

Test: imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html

* page/WindowFeatures.cpp:
(WebCore::setWindowFeature):

LayoutTests:

* tests-options.json:



Canonical link: https://commits.webkit.org/248130@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
zcorpan added a commit to zcorpan/content that referenced this pull request Mar 8, 2022
@zcorpan zcorpan mentioned this pull request Mar 8, 2022
3 tasks
@zcorpan zcorpan removed the impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation label Mar 8, 2022
@zcorpan
Copy link
Member Author

zcorpan commented Mar 8, 2022

@zcorpan zcorpan added the impacts documentation Used by documentation communities, such as MDN, to track changes that impact documentation label Mar 8, 2022
annulen pushed a commit to qtwebkit/qtwebkit that referenced this pull request Mar 8, 2022
https://bugs.webkit.org/show_bug.cgi?id=237530

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Import WPT test coverage.

* resources/resource-files.json:
* web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-is-popup-condition.html:
* web-platform-tests/html/browsers/the-window-object/support/w3c-import.log:
* web-platform-tests/html/browsers/the-window-object/support/windowFeature-values-target.html: Added.
* web-platform-tests/html/browsers/the-window-object/w3c-import.log:
* web-platform-tests/html/browsers/the-window-object/window-open-noopener.html:
* web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values-expected.txt: Added.
* web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html: Added.

Source/WebCore:

Make "true" count as truthy in window.open()'s boolean features, as per:
- whatwg/html#7425

Test: imported/w3c/web-platform-tests/html/browsers/the-window-object/window-open-windowfeatures-values.html

* page/WindowFeatures.cpp:
(WebCore::setWindowFeature):

LayoutTests:

* tests-options.json:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@290899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Elchi3 pushed a commit to mdn/content that referenced this pull request Mar 21, 2022
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Mar 22, 2022
…dowFeatures, a=testonly

Automatic update from web-platform-tests
Add "true" to truthy values list for windowFeatures

Prior to this CL, window.open(url, '', 'noopener=true') would treat
'noopener=true' as if noopener is false. This is currently per-spec [1]
but there is a desire [2][3] to change that.

The I2S is here:
https://groups.google.com/a/chromium.org/g/blink-dev/c/ePJ4GE6VzVc/m/urs3-4rHDAAJ

[1] https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-parse-boolean
[2] whatwg/html#7425
[3] whatwg/html#7399

Fixed: 1277613
Change-Id: I5b3a7e985a9bb392c2150846b50369cfcd9b05fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3495659
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#977722}

--

wpt-commits: 2026041556d8c61e167d0a0d3d0bbbeaf99dcd70
wpt-pr: 33029
aosmond pushed a commit to aosmond/gecko that referenced this pull request Mar 26, 2022
…dowFeatures, a=testonly

Automatic update from web-platform-tests
Add "true" to truthy values list for windowFeatures

Prior to this CL, window.open(url, '', 'noopener=true') would treat
'noopener=true' as if noopener is false. This is currently per-spec [1]
but there is a desire [2][3] to change that.

The I2S is here:
https://groups.google.com/a/chromium.org/g/blink-dev/c/ePJ4GE6VzVc/m/urs3-4rHDAAJ

[1] https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-parse-boolean
[2] whatwg/html#7425
[3] whatwg/html#7399

Fixed: 1277613
Change-Id: I5b3a7e985a9bb392c2150846b50369cfcd9b05fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3495659
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#977722}

--

wpt-commits: 2026041556d8c61e167d0a0d3d0bbbeaf99dcd70
wpt-pr: 33029
bytes-crafter pushed a commit to openFyde/chromium that referenced this pull request May 28, 2025
Prior to this CL, window.open(url, '', 'noopener=true') would treat
'noopener=true' as if noopener is false. This is currently per-spec [1]
but there is a desire [2][3] to change that.

The I2S is here:
https://groups.google.com/a/chromium.org/g/blink-dev/c/ePJ4GE6VzVc/m/urs3-4rHDAAJ


[1] https://html.spec.whatwg.org/multipage/window-object.html#concept-window-open-features-parse-boolean
[2] whatwg/html#7425
[3] whatwg/html#7399

Fixed: 1277613
Change-Id: I5b3a7e985a9bb392c2150846b50369cfcd9b05fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3495659
Reviewed-by: Joey Arhar <jarhar@chromium.org>
Commit-Queue: Mason Freed <masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#977722}
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
Development

Successfully merging this pull request may close these issues.

Should 'true' count as truthy in parsing windowFeatures booleans?
4 participants