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

Return null when window.open() is popup blocked #1854

Merged
merged 1 commit into from
Oct 4, 2016
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Oct 4, 2016

Follow up to #1848, fixes #1851.

@zcorpan
Copy link
Member

zcorpan commented Oct 4, 2016

Filed
https://bugs.webkit.org/show_bug.cgi?id=162897
https://bugs.chromium.org/p/chromium/issues/detail?id=652640

No web-platform-test because according to @jgraham there's no way currently to test with the popup blocker enabled. Filed web-platform-tests/wpt#3867

@@ -78673,7 +78673,7 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
<p>Otherwise, apply <span>the rules for choosing a browsing context given a browsing context
name</span> using <var>target</var> as the name and <var>source browsing context</var> as the
context in which the algorithm is executed. If this results in there not being a chosen browsing
context, then abort these steps. Otherwise, let <var>target browsing context</var> be the
context, then return null. Otherwise, let <var>target browsing context</var> be the
Copy link
Member

Choose a reason for hiding this comment

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

Should this say "return null and abort these steps", or have we stopped using such phrasing in HTML?

Copy link
Member Author

Choose a reason for hiding this comment

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

We are slowly moving away from it.

@zcorpan zcorpan merged commit 29ded68 into master Oct 4, 2016
@zcorpan zcorpan deleted the window-open-null branch October 4, 2016 12:35
kisg pushed a commit to paul99/webkit-mips that referenced this pull request Oct 4, 2016
https://bugs.webkit.org/show_bug.cgi?id=162897

Reviewed by Michael Catanzaro.

Source/WebCore:

The return value of window.open() when the popup is blocked should be null:
- whatwg/html#1854
- whatwg/html#1851

Firefox / Edge return null.

No new tests, rebaselined existing tests.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::open):

LayoutTests:

Rebaseline existing tests to reflect behavior change.

* fast/events/popup-blocked-from-fake-button-click-expected.txt:
* fast/events/popup-blocked-from-fake-button-click.html:
* fast/events/popup-blocked-from-fake-focus-expected.txt:
* fast/events/popup-blocked-from-fake-focus.html:
* fast/events/popup-blocked-from-fake-user-gesture-expected.txt:
* fast/events/popup-blocked-from-fake-user-gesture.html:
* fast/events/popup-blocked-from-untrusted-click-event-on-anchor-expected.txt:
* fast/events/popup-blocked-from-untrusted-click-event-on-anchor.html:
* fast/events/popup-blocking-timers3-expected.txt:
* fast/events/popup-blocking-timers3.html:
* fast/events/popup-blocking-timers4-expected.txt:
* fast/events/popup-blocking-timers4.html:
* fast/events/popup-blocking-timers6-expected.txt:
* fast/events/popup-blocking-timers6.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@206777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Return value of window.open when popup is blocked
2 participants