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

Issue 1233313008: Stop calling configureTextTrackDisplay() in clearMediaPlayer() (Closed)

Created:
5 years, 5 months ago by philipj_slow
Modified:
5 years, 5 months ago
Reviewers:
sof, fs
CC:
blink-reviews, nessy, mlamouri+watch-blink_chromium.org, philipj_slow, gasubic, fs, eric.carlson_apple.com, feature-media-reviews_chromium.org, dglazkov+blink, blink-reviews-html_chromium.org, vcarbune.chromium
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Stop calling configureTextTrackDisplay() in clearMediaPlayer() In the test case, the call chain is: HTMLMediaElement::didMoveToNewDocument() -> userCancelledLoad() -> clearMediaPlayer() -> configureTextTrackDisplay() -> updateTextTrackDisplay() -> ensureTextTrackContainer() ensureTextTrackContainer() will create the text track container if it did not exist, triggering the assert in the EventDispatchForbiddenScope set up by ContainerNode::appendChild(). In the test case, the order of setting TextTrack.mode and appending the HTMLTrackElement matters, which is at the root of the problem. If the text track container had been created, then there wouldn't have been any attempt to create it when moving to a new document. Unfortunately, the logic largely matches what the spec says: https://www.w3.org/Bugs/Public/show_bug.cgi?id=28973 Instead of fixing the assymetry, just remove the configureTextTrackDisplay() call and depend on the cueTimeline().updateActiveCues(0) call in userCancelledLoad() instead. This should suffice, because from the point of view of text track rendering, the current time is all that matters. The VisibilityChangeAssumption enum was introduced in order to avoid unnecessary work in configureTextTrackDisplay(): https://codereview.chromium.org/22645014 This depends on a recent change to decouple VTTCue from VTTCueBox and LayoutVTTCue, without which the configureTextTrackDisplay() call was needed to avoid use-after-free of those VTTCue* pointers: https://codereview.chromium.org/1240433007 BUG=489998 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=199210

Patch Set 1 #

Patch Set 2 : proper test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -18 lines) Patch
A LayoutTests/media/track/media-element-move-to-new-document-assert.html View 1 1 chunk +22 lines, -0 lines 0 comments Download
A LayoutTests/media/track/media-element-move-to-new-document-assert-expected.txt View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/html/HTMLMediaElement.h View 1 chunk +1 line, -5 lines 0 comments Download
M Source/core/html/HTMLMediaElement.cpp View 4 chunks +3 lines, -13 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
philipj_slow
This is just for context for https://codereview.chromium.org/1240433007 I also need to write a proper description ...
5 years, 5 months ago (2015-07-17 12:09:44 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1233313008/20001
5 years, 5 months ago (2015-07-20 14:10:46 UTC) #3
philipj_slow
sof, would you mind taking a look since you looked at the dependent patch set? ...
5 years, 5 months ago (2015-07-20 14:24:50 UTC) #5
sof
lgtm
5 years, 5 months ago (2015-07-20 14:40:38 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_blink_rel on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/71763)
5 years, 5 months ago (2015-07-20 15:45:21 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1233313008/20001
5 years, 5 months ago (2015-07-21 07:12:21 UTC) #10
commit-bot: I haz the power
5 years, 5 months ago (2015-07-21 07:58:21 UTC) #11
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=199210

Powered by Google App Engine
This is Rietveld 408576698