Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Issue 1481913002: Remove userCancelledLoad and refactor the code at the call sites (Closed)

Created:
5 years ago by Srirama
Modified:
5 years ago
Reviewers:
philipj_slow
CC:
chromium-reviews, nessy, mlamouri+watch-blink_chromium.org, blink-reviews-html_chromium.org, gasubic, fs, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, blink-reviews, vcarbune.chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove userCancelledLoad and refactor the code at the call sites The function userCancelledLoad isn't called when the user cancels the load (there's no way to do that) and yet it implements that bit of the spec. So removing this function and adding only the necessary bits at the call sites. Committed: https://crrev.com/fa2a5db2eb8b92301b06f65aa644aef1a5bf709c Cr-Commit-Position: refs/heads/master@{#363193}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Address review comments #

Total comments: 2

Patch Set 3 : Add test case #

Patch Set 4 : Updated test case #

Total comments: 13

Patch Set 5 : Address comments and fix failing test #

Patch Set 6 : Add Doctype in the test case #

Total comments: 4

Patch Set 7 : address nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -82 lines) Patch
A + third_party/WebKit/LayoutTests/media/gc-pending-event.html View 1 2 3 4 5 6 2 chunks +2 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/media/gc-pending-event-inactive-document.html View 1 2 3 4 5 6 1 chunk +0 lines, -19 lines 0 comments Download
A third_party/WebKit/LayoutTests/media/video-move-to-new-document.html View 1 2 3 4 5 6 1 chunk +34 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLMediaElement.cpp View 1 2 3 4 4 chunks +14 lines, -57 lines 0 comments Download

Messages

Total messages: 35 (12 generated)
Srirama
As per our discussion in https://codereview.chromium.org/1416073002/#msg27 cleaned up the userCancelledLoad function. PTAL.
5 years ago (2015-11-27 13:19:13 UTC) #4
philipj_slow
Promising cleanup! https://codereview.chromium.org/1481913002/diff/20001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp (right): https://codereview.chromium.org/1481913002/diff/20001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp#newcode387 third_party/WebKit/Source/core/html/HTMLMediaElement.cpp:387: // which could result in cancelledLoad() being ...
5 years ago (2015-11-27 14:01:28 UTC) #5
Srirama
Modified as per review comments but scheduleDelayedAction(LoadMediaResource); in didMoveToNewDocument is creating problem. https://codereview.chromium.org/1481913002/diff/20001/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp File third_party/WebKit/Source/core/html/HTMLMediaElement.cpp ...
5 years ago (2015-11-30 12:43:34 UTC) #6
philipj_slow
I suppose that the problem with gc-pending-event-inactive-document.html is the cancelPendingEventsAndCallbacks() call in HTMLMediaElement::prepareForLoad()? That test ...
5 years ago (2015-11-30 12:55:17 UTC) #7
Srirama
On 2015/11/30 12:55:17, philipj wrote: > I suppose that the problem with gc-pending-event-inactive-document.html is the ...
5 years ago (2015-11-30 14:47:28 UTC) #8
philipj_slow
On 2015/11/30 14:47:28, Srirama wrote: > On 2015/11/30 12:55:17, philipj wrote: > > I suppose ...
5 years ago (2015-11-30 15:16:19 UTC) #9
Srirama
On 2015/11/30 15:16:19, philipj wrote: > On 2015/11/30 14:47:28, Srirama wrote: > > On 2015/11/30 ...
5 years ago (2015-12-02 07:54:24 UTC) #10
philipj_slow
On 2015/12/02 07:54:24, Srirama wrote: > Added test case, but there seems to be some ...
5 years ago (2015-12-02 08:29:08 UTC) #11
Srirama
On 2015/12/02 08:29:08, philipj wrote: > On 2015/12/02 07:54:24, Srirama wrote: > > Added test ...
5 years ago (2015-12-02 08:56:46 UTC) #12
philipj_slow
On 2015/12/02 08:56:46, Srirama wrote: > On 2015/12/02 08:29:08, philipj wrote: > > On 2015/12/02 ...
5 years ago (2015-12-02 09:05:43 UTC) #13
Srirama
On 2015/12/02 09:05:43, philipj wrote: > On 2015/12/02 08:56:46, Srirama wrote: > > On 2015/12/02 ...
5 years ago (2015-12-02 09:14:50 UTC) #14
philipj_slow
On 2015/12/02 09:14:50, Srirama wrote: > On 2015/12/02 09:05:43, philipj wrote: > > On 2015/12/02 ...
5 years ago (2015-12-02 09:35:34 UTC) #15
Srirama
On 2015/12/02 09:35:34, philipj wrote: > On 2015/12/02 09:14:50, Srirama wrote: > > On 2015/12/02 ...
5 years ago (2015-12-02 10:02:46 UTC) #16
philipj_slow
On 2015/12/02 10:02:46, Srirama wrote: > On 2015/12/02 09:35:34, philipj wrote: > > On 2015/12/02 ...
5 years ago (2015-12-02 10:06:30 UTC) #17
Srirama
Followed the test case ManualTests/media-elements/video-moved-from-iframe-to-main-page.html and finally made the test case work. If this is ...
5 years ago (2015-12-02 13:30:52 UTC) #18
philipj_slow
I like where this is going, test needs a little bit of work and HTMLMediaElement::stop() ...
5 years ago (2015-12-02 14:02:14 UTC) #19
Srirama
Thanks for the inputs. Cleaned up as suggested. https://codereview.chromium.org/1481913002/diff/80001/third_party/WebKit/LayoutTests/media/video-move-to-new-document.html File third_party/WebKit/LayoutTests/media/video-move-to-new-document.html (right): https://codereview.chromium.org/1481913002/diff/80001/third_party/WebKit/LayoutTests/media/video-move-to-new-document.html#newcode2 third_party/WebKit/LayoutTests/media/video-move-to-new-document.html:2: <html> ...
5 years ago (2015-12-02 14:39:19 UTC) #23
philipj_slow
lgtm, but the added test is of the variety that can tend to be flaky, ...
5 years ago (2015-12-04 10:58:38 UTC) #25
Srirama
Ran the test case 5k times and it is fine. Hopefully it will maintain the ...
5 years ago (2015-12-04 12:11:06 UTC) #28
philipj_slow
5k LGTM :)
5 years ago (2015-12-04 12:23:33 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1481913002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1481913002/240001
5 years ago (2015-12-04 12:24:03 UTC) #31
commit-bot: I haz the power
Committed patchset #7 (id:240001)
5 years ago (2015-12-04 13:29:36 UTC) #33
commit-bot: I haz the power
5 years ago (2015-12-04 13:30:28 UTC) #35
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/fa2a5db2eb8b92301b06f65aa644aef1a5bf709c
Cr-Commit-Position: refs/heads/master@{#363193}

Powered by Google App Engine
This is Rietveld 408576698