Do not fire readystatechange events at documents about to get replaced by javascript...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jul 2019 22:53:47 +0000 (22:53 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Jul 2019 22:53:47 +0000 (22:53 +0000)
commit896cb770bc9e2e2bb1d12feb79fdec5002bcbcac
tree4104412e35cfc3f70d781aae14cec8ed46f9fce8
parent1eb7512af656e6ad4576f26fea3f900e5a0f7aec
Do not fire readystatechange events at documents about to get replaced by javascript URLs.
<rdar://problem/51665406> and https://bugs.webkit.org/show_bug.cgi?id=198786

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: http/tests/dom/ready-state-on-javascript-replace.html

We were firing too many readystatechange events, more than other browsers.
Our behavior on this test with this patch now matches Chrome.

(There was even an ancient FIXME alluding to this referencing a spec issue, and that issues has long been resolvedv)

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):

LayoutTests:

* http/tests/dom/ready-state-on-javascript-replace-expected.txt: Added.
* http/tests/dom/ready-state-on-javascript-replace.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/dom/ready-state-on-javascript-replace-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/dom/ready-state-on-javascript-replace.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/loader/FrameLoader.cpp