diff options
author | jsbell@chromium.org <jsbell@chromium.org> | 2015-07-24 23:05:19 +0000 |
---|---|---|
committer | jsbell@chromium.org <jsbell@chromium.org> | 2015-07-24 23:05:19 +0000 |
commit | e9d4585561419eae6532bb835bcbd5822612cf16 (patch) | |
tree | 2c34b69d9da517b8a4fa8b1088174998b82745bd | |
parent | 114e801563ddfee2dd4b1f5625d7a8fdaebf3b55 (diff) | |
download | chromium_src-e9d4585561419eae6532bb835bcbd5822612cf16.zip chromium_src-e9d4585561419eae6532bb835bcbd5822612cf16.tar.gz chromium_src-e9d4585561419eae6532bb835bcbd5822612cf16.tar.bz2 |
FileAPI: ProgressEvent should not be cancelable
Per specs[1,2] the "progress" event of type ProgressEvent fired at
FileReader objects should not be cancelable. Blink doesn't respond to
a preventDefault() anyway - this is probably just an oversight.
[1] https://w3c.github.io/FileAPI/
[2] https://xhr.spec.whatwg.org/#firing-events-using-the-progressevent-interface
BUG=509782
R=kinuko@chromium.org
Review URL: https://codereview.chromium.org/1230113009
git-svn-id: svn://svn.chromium.org/blink/trunk@199467 bbb929c8-8fbe-4397-9dbb-9b2b20218538
5 files changed, 4 insertions, 8 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-get-expected.txt b/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-get-expected.txt index f39dd1f..9af9a7a 100644 --- a/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-get-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-get-expected.txt @@ -45,7 +45,7 @@ NONE : '0' SELECT : '16384' bubbles : 'false' cancelBubble : 'false' -cancelable : 'true' +cancelable : 'false' currentTarget : '[object XMLHttpRequest]' defaultPrevented : 'false' eventPhase : '2' diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-expected.txt b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-expected.txt index 0711820..0f7ba22 100644 --- a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-expected.txt +++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-expected.txt @@ -4,7 +4,7 @@ You should see type, bubble, cancelable, eventPhase, target and current target. Type: progress Bubble: false -Cancelable: true +Cancelable: false EventPhase: 2 Target: [object XMLHttpRequest] Current target: [object XMLHttpRequest] diff --git a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob-expected.txt b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob-expected.txt index 424cd0c..83746dc 100644 --- a/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob-expected.txt +++ b/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/infoOnProgressEvent-response-type-blob-expected.txt @@ -4,7 +4,7 @@ You should see type, bubble, cancelable, eventPhase, target and current target. Type: progress Bubble: false -Cancelable: true +Cancelable: false EventPhase: 2 Target: [object XMLHttpRequest] Current target: [object XMLHttpRequest] diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable-expected.txt b/third_party/WebKit/LayoutTests/imported/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable-expected.txt deleted file mode 100644 index 8828716..0000000 --- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/FileAPI/FileReader/Progress_event_bubbles_cancelable-expected.txt +++ /dev/null @@ -1,4 +0,0 @@ -This is a testharness.js-based test. -FAIL Check the values of bubbles and cancelable are false when the progress event is dispatched assert_false: The cancelable must be false when the event is dispatched expected false got true -Harness: the test ran to completion. - diff --git a/third_party/WebKit/Source/core/events/ProgressEvent.cpp b/third_party/WebKit/Source/core/events/ProgressEvent.cpp index 55e2f74b..dc857f4 100644 --- a/third_party/WebKit/Source/core/events/ProgressEvent.cpp +++ b/third_party/WebKit/Source/core/events/ProgressEvent.cpp @@ -44,7 +44,7 @@ ProgressEvent::ProgressEvent(const AtomicString& type, const ProgressEventInit& } ProgressEvent::ProgressEvent(const AtomicString& type, bool lengthComputable, unsigned long long loaded, unsigned long long total) - : Event(type, false, true) + : Event(type, false, false) , m_lengthComputable(lengthComputable) , m_loaded(loaded) , m_total(total) |