зеркало из https://github.com/mozilla/gecko-dev.git
Bug 602072 - Backed out changeset 5a67103cdf2b a=backout
This commit is contained in:
Родитель
85ce9b334b
Коммит
ef77e5e7aa
|
@ -831,11 +831,9 @@ static PRBool IsAutoplayEnabled()
|
||||||
void nsHTMLMediaElement::UpdatePreloadAction()
|
void nsHTMLMediaElement::UpdatePreloadAction()
|
||||||
{
|
{
|
||||||
PreloadAction nextAction = PRELOAD_UNDEFINED;
|
PreloadAction nextAction = PRELOAD_UNDEFINED;
|
||||||
// If autoplay is set, or we're playing, we should always preload data,
|
// If autoplay is set, we should always preload data, as we'll need it
|
||||||
// as we'll need it to play.
|
// to play.
|
||||||
if ((IsAutoplayEnabled() && HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay)) ||
|
if (IsAutoplayEnabled() && HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay)) {
|
||||||
!mPaused)
|
|
||||||
{
|
|
||||||
nextAction = nsHTMLMediaElement::PRELOAD_ENOUGH;
|
nextAction = nsHTMLMediaElement::PRELOAD_ENOUGH;
|
||||||
} else {
|
} else {
|
||||||
// Find the appropriate preload action by looking at the attribute.
|
// Find the appropriate preload action by looking at the attribute.
|
||||||
|
@ -1396,9 +1394,7 @@ NS_IMETHODIMP nsHTMLMediaElement::Play()
|
||||||
mPaused = PR_FALSE;
|
mPaused = PR_FALSE;
|
||||||
mAutoplaying = PR_FALSE;
|
mAutoplaying = PR_FALSE;
|
||||||
// We changed mPaused and mAutoplaying which can affect AddRemoveSelfReference
|
// We changed mPaused and mAutoplaying which can affect AddRemoveSelfReference
|
||||||
// and our preload status.
|
|
||||||
AddRemoveSelfReference();
|
AddRemoveSelfReference();
|
||||||
UpdatePreloadAction();
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -535,27 +535,6 @@ var tests = [
|
||||||
v.src = test.name;
|
v.src = test.name;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
// 18. On a preload='none' video, call play() before load algorithms's sync
|
|
||||||
// has run, the play() call should override preload='none'.
|
|
||||||
ended:
|
|
||||||
function(e) {
|
|
||||||
ok(true, "(18) Got playback ended.");
|
|
||||||
var v = e.target;
|
|
||||||
v._finished = true;
|
|
||||||
maybeFinish(v, 18);
|
|
||||||
},
|
|
||||||
|
|
||||||
setup:
|
|
||||||
function(v) {
|
|
||||||
v.addEventListener("ended", this.ended, false);
|
|
||||||
v._finished = false;
|
|
||||||
v.preload = "none";
|
|
||||||
v.src = test.name; // Schedules async section to continue load algorithm.
|
|
||||||
document.body.appendChild(v);
|
|
||||||
v.play(); // Should cause preload:none to be overridden.
|
|
||||||
},
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
function startTest(test, token) {
|
function startTest(test, token) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче