DescriptionStop 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 #
Messages
Total messages: 11 (4 generated)
|