Set window.closed immediately when close() is invoked
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Mar 2019 20:46:57 +0000 (20:46 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Mar 2019 20:46:57 +0000 (20:46 +0000)
commit448c4d30d605ae137a39528d9ef397014506d69b
tree4add6e360b831845f375dbbdbc0f011740f1ae5c
parent3343d4bdacc24b8968e160c16cd2cd4f0b676d2e
Set window.closed immediately when close() is invoked
https://bugs.webkit.org/show_bug.cgi?id=195409

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline WPT tests now that more checks are passing.

* web-platform-tests/html/browsers/the-window-object/close-method.window-expected.txt:
* web-platform-tests/html/browsers/the-window-object/closed-attribute.window-expected.txt:

Source/WebCore:

Window.closed should return true if it is closing:
- https://html.spec.whatwg.org/#dom-window-closed

Window.close() sets the 'is closing' flag to true synchronously, as per:
- https://html.spec.whatwg.org/#dom-window-close (step 3.1)

No new tests, rebaselined existing tests.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::closed const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/close-method.window-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/closed-attribute.window-expected.txt
LayoutTests/imported/w3c/web-platform-tests/html/browsers/the-window-object/self-et-al.window-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/page/DOMWindow.cpp