зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1550633 - part8 : no need to reload if the new url is the same. r=jya
Accoding to spec [1], after loading finished, the start the track processing model would stop at step12 and wait until the track URL changes to the URL which is not equal to the URL we have loaded before. That means, if we change track URL to the same URL we loaded before, we won't have to reload the resource. [1] https://html.spec.whatwg.org/multipage/media.html#sourcing-out-of-band-text-tracks:track-url-5 Differential Revision: https://phabricator.services.mozilla.com/D31557 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d93f54a6a0
Коммит
58d248f6f0
|
@ -213,6 +213,15 @@ bool HTMLTrackElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
|||
}
|
||||
|
||||
void HTMLTrackElement::SetSrc(const nsAString& aSrc, ErrorResult& aError) {
|
||||
LOG(LogLevel::Info,
|
||||
("%p Set src=%s", this, NS_ConvertUTF16toUTF8(aSrc).get()));
|
||||
|
||||
nsAutoString src;
|
||||
if (GetAttr(kNameSpaceID_None, nsGkAtoms::src, src) && src == aSrc) {
|
||||
LOG(LogLevel::Info, ("%p No need to reload for same src url", this));
|
||||
return;
|
||||
}
|
||||
|
||||
SetHTMLAttr(nsGkAtoms::src, aSrc, aError);
|
||||
SetReadyState(TextTrackReadyState::NotLoaded);
|
||||
if (!mMediaParent) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче