From ef77e5e7aa4e2731233308fd1a292103121539db Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Sun, 17 Oct 2010 10:03:58 +1300 Subject: [PATCH] Bug 602072 - Backed out changeset 5a67103cdf2b a=backout --- .../html/content/src/nsHTMLMediaElement.cpp | 10 +++------ content/media/test/test_preload_actions.html | 21 ------------------- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/content/html/content/src/nsHTMLMediaElement.cpp b/content/html/content/src/nsHTMLMediaElement.cpp index 9ef52f1565dc..bae9d8f0c59a 100644 --- a/content/html/content/src/nsHTMLMediaElement.cpp +++ b/content/html/content/src/nsHTMLMediaElement.cpp @@ -831,11 +831,9 @@ static PRBool IsAutoplayEnabled() void nsHTMLMediaElement::UpdatePreloadAction() { PreloadAction nextAction = PRELOAD_UNDEFINED; - // If autoplay is set, or we're playing, we should always preload data, - // as we'll need it to play. - if ((IsAutoplayEnabled() && HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay)) || - !mPaused) - { + // If autoplay is set, we should always preload data, as we'll need it + // to play. + if (IsAutoplayEnabled() && HasAttr(kNameSpaceID_None, nsGkAtoms::autoplay)) { nextAction = nsHTMLMediaElement::PRELOAD_ENOUGH; } else { // Find the appropriate preload action by looking at the attribute. @@ -1396,9 +1394,7 @@ NS_IMETHODIMP nsHTMLMediaElement::Play() mPaused = PR_FALSE; mAutoplaying = PR_FALSE; // We changed mPaused and mAutoplaying which can affect AddRemoveSelfReference - // and our preload status. AddRemoveSelfReference(); - UpdatePreloadAction(); return NS_OK; } diff --git a/content/media/test/test_preload_actions.html b/content/media/test/test_preload_actions.html index 230fa4335396..4172c4cfa9ae 100644 --- a/content/media/test/test_preload_actions.html +++ b/content/media/test/test_preload_actions.html @@ -535,27 +535,6 @@ var tests = [ 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) {