-
Kirill Ovchinnikov authored
This patch makes Blink more strictly conform HTML standard and avoid some HTMLMediaElement issues connected with 'src' attribute mutations: - according to [1] now Blink will drop all previously loaded cues on 'src' change event if the new URL is not equal with the previous URL to prevent old subtitles track from being showing while playing the media (this also has a deviation from the spec because of unclarified behaviour described in [2]). - The TextTrack.cues object will not be nulled if an empty 'src' value is set, to guarantee the returning of the same object on every cues() call (like [3] requires). - An 'error' event will be fired if the new URL is empty [4] - no events will be fired if the new URL is equal to the previous URL [5] [1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:text-track-list-of-cues-5 [2] https://github.com/whatwg/html/issues/2916 [3] https://html.spec.whatwg.org/multipage/media.html#text-track-api:texttrack-22 [4] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:event-track-error [5] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:track-url-5 Bug: 751151 Change-Id: Ib7acafb971d93229ae4b425572684b6737d81f38 Reviewed-on: https://chromium-review.googlesource.com/602109 Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#496741}
fdcfc1a3