Backed out changeset bbd9375c5f50 (bug 938772) mochitest 5 timeout failures

This commit is contained in:
Carsten "Tomcat" Book 2013-12-06 15:58:22 +01:00
Родитель 99bdd98dd5
Коммит 7613b51252
4 изменённых файлов: 14 добавлений и 38 удалений

Просмотреть файл

@ -92,7 +92,8 @@ nsVideoFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
// And now have it update its internal state
element->UpdateState(false);
UpdatePosterSource(false);
nsresult res = UpdatePosterSource(false);
NS_ENSURE_SUCCESS(res,res);
if (!aElements.AppendElement(mPosterImage))
return NS_ERROR_OUT_OF_MEMORY;
@ -591,22 +592,20 @@ nsVideoFrame::GetVideoIntrinsicSize(nsRenderingContext *aRenderingContext)
nsPresContext::CSSPixelsToAppUnits(size.height));
}
void
nsresult
nsVideoFrame::UpdatePosterSource(bool aNotify)
{
NS_ASSERTION(HasVideoElement(), "Only call this on <video> elements.");
HTMLVideoElement* element = static_cast<HTMLVideoElement*>(GetContent());
if (element->HasAttr(kNameSpaceID_None, nsGkAtoms::poster)) {
nsAutoString posterStr;
element->GetPoster(posterStr);
mPosterImage->SetAttr(kNameSpaceID_None,
nsGkAtoms::src,
posterStr,
aNotify);
} else {
mPosterImage->UnsetAttr(kNameSpaceID_None, nsGkAtoms::poster, aNotify);
}
nsAutoString posterStr;
element->GetPoster(posterStr);
nsresult res = mPosterImage->SetAttr(kNameSpaceID_None,
nsGkAtoms::src,
posterStr,
aNotify);
NS_ENSURE_SUCCESS(res,res);
return NS_OK;
}
NS_IMETHODIMP
@ -615,7 +614,8 @@ nsVideoFrame::AttributeChanged(int32_t aNameSpaceID,
int32_t aModType)
{
if (aAttribute == nsGkAtoms::poster && HasVideoElement()) {
UpdatePosterSource(true);
nsresult res = UpdatePosterSource(true);
NS_ENSURE_SUCCESS(res,res);
}
return nsContainerFrame::AttributeChanged(aNameSpaceID,
aAttribute,

Просмотреть файл

@ -112,7 +112,7 @@ protected:
// Sets the mPosterImage's src attribute to be the video's poster attribute,
// if we're the frame for a video element. Only call on frames for video
// elements, not for frames for audio elements.
void UpdatePosterSource(bool aNotify);
nsresult UpdatePosterSource(bool aNotify);
virtual ~nsVideoFrame();

Просмотреть файл

@ -79,7 +79,6 @@ support-files = bug633762_iframe.html
[test_bug831780.html]
[test_bug841361.html]
[test_bug904810.html]
[test_bug938772.html]
[test_contained_plugin_transplant.html]
[test_image_selection.html]
[test_image_selection_2.html]

Просмотреть файл

@ -1,23 +0,0 @@
<!doctype html>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=938772
-->
<title>Test for Bug 938772</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=938772">Mozilla Bug 938772</a>
<p id="display"></p>
<iframe id="i"
src="data:text/html,<base href='http://basetag/basetag'><video id='v' onerror='v.failed=true'></video>"></iframe>
<pre id="test">
<script>
SimpleTest.waitForExplicitFinish();
i.onload = function() {
ok(!i.contentDocument.getElementById("v").failed,
"Check whether an error was reported");
SimpleTest.finish();
};
</script>