Commit 7e8a1bf5 authored by Philip Jägenstedt's avatar Philip Jägenstedt Committed by Commit Bot

Make UA-created PopStateEvent non-cancelable

It is not cancelable in the spec:
https://html.spec.whatwg.org/#history-traversal

Investigating behavior in Chrome, Edge, Firefox and Safari, it was
only cancelable in Chrome and Safari:
https://github.com/web-platform-tests/wpt/pull/11355#issuecomment-394696654

It doesn't actually make any sense to cancel it, so this is most
likely an historical accident.

Change-Id: I3982d4414d1214784a6d8af3b03ea7264ff93b48
Reviewed-on: https://chromium-review.googlesource.com/1087047
Commit-Queue: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565630}
parent 2de6bd20
This is a testharness.js-based test.
FAIL Queue a task to fire popstate event assert_false: cancelable expected false got true
Harness: the test ran to completion.
......@@ -47,7 +47,7 @@ PopStateEvent::PopStateEvent(ScriptState* script_state,
PopStateEvent::PopStateEvent(
scoped_refptr<SerializedScriptValue> serialized_state,
History* history)
: Event(EventTypeNames::popstate, Bubbles::kNo, Cancelable::kYes),
: Event(EventTypeNames::popstate, Bubbles::kNo, Cancelable::kNo),
serialized_state_(std::move(serialized_state)),
history_(history) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment