Bug 1629381 Comment 21 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

[nsLayoutUtils::SurfaceFromElement()](https://searchfox.org/mozilla-central/rev/851bbbd9d9a38c2785a24c13b6412751be8d3253/layout/base/nsLayoutUtils.cpp#7045) seems to expect the followings.

-[1] When ready state of MediaElement is HAVE_NOTHING or HAVE_METADATA, it does not do rendering without exception.
-[2] When HTMLMediaElement::GetCurrentImage() does not return a valid image and if the ready state is not [1], CanvasRenderingContext2D::DrawImage() throws InvalidStateError.
[nsLayoutUtils::SurfaceFromElement()](https://searchfox.org/mozilla-central/rev/851bbbd9d9a38c2785a24c13b6412751be8d3253/layout/base/nsLayoutUtils.cpp#7045) seems to expect the followings.

-[1] When ready state of MediaElement is HAVE_NOTHING or HAVE_METADATA, it does not do rendering without exception.
-[2] When [HTMLMediaElement::GetCurrentImage()](https://searchfox.org/mozilla-central/rev/0b2870194375d80b54608c39060884acb758c206/dom/html/HTMLMediaElement.cpp#2166) does not return a valid image and if the ready state is not [1], CanvasRenderingContext2D::DrawImage() throws InvalidStateError.

Back to Bug 1629381 Comment 21