This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tweak window.open features argument tokenizer to match HTML standard …
…and Edge https://bugs.webkit.org/show_bug.cgi?id=170548 Reviewed by Geoffrey Garen. LayoutTests/imported/w3c: * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt: Rebaseline test now that more checks are passing. The remaining failures are because the test currently expects "noopener=0" / "noopener=false" to activate the 'noopener' feature. The test matches the specification which currently says that if the 'noopener' key is present, then the 'noopener' feature should be activated, no matter its value. However, I am intentionally not making this change yet because: - This behavior would be inconsistent with other Window features - There is upstream discussion on this (whatwg/html#2600) and the current feedback is that the specification should likely change to treat 'noopener' more consistently with other features. I will follow-up once the specification / test settles. * web-platform-tests/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener.html: Re-sync test from upstream after web-platform-tests/wpt#5715. Source/WebCore: Update window.open() features argument tokenizer to match HTML standard: - https://html.spec.whatwg.org/#concept-window-open-features-tokenize Also update window.open() to return null instead of the window when the 'noopener' feature is activated, as per: - https://html.spec.whatwg.org/#dom-open (Step 10) No new tests, rebaselined existing test. * page/DOMWindow.cpp: (WebCore::DOMWindow::createWindow): Update window.open() to return null instead of the window when the 'noopener' feature is activated, as per: - https://html.spec.whatwg.org/#dom-open (Step 10) * page/WindowFeatures.cpp: (WebCore::isSeparator): Treat all ASCII spaces as feature separators, as per: - https://html.spec.whatwg.org/#feature-separator This has the effect of adding U+000C (FormFeed) as a separator. (WebCore::processFeaturesString): Align tokenizing code with the specification: - https://html.spec.whatwg.org/#concept-window-open-features-tokenize In particular, the following changes were made: - After the key, skip to first '=', but don't skip past a ',' or a non-separator. The "or a non-separator" part is new in the spec (step 3.6.1) and is now implemented. - After looking for the '=', only treat what follows as a value if the current character is a separator. This is as per step 7 in the spec. These changes now cause us to parse 'foo noopener=1' as ('foo', ''), ('noopener', '1'). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@215945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
cdumez@apple.com
committed
Apr 28, 2017
1 parent
a8b5193
commit 08907ab
Showing
9 changed files
with
102 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 5 additions & 8 deletions
13
...and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
...and-navigating-browsing-contexts-by-name/open-features-tokenization-noopener-expected.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters