Bug 1789878 Comment 0 Edit History

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

This is a follow-up bug for bug 1774300.

The  *HTMLImageElement*'s result of having cross-origin redirects or not is different from the one obtained in *HTMLVideoElement* in the same situation.

The

If the *HTMLImageElement*'s `src`  is in a cross-origin domain but redirected to the same domain, then it thinks it has **no** cross-origin redirect. However, in the same case, the *HTMLVideoElement* consider the `src` **has** a cross-origin redirect.

This is found during implementing `VideoFrame` when I was trying to use the `nsLayoutUtils::SurfaceFromElement` for [HTMLImageElement](https://searchfox.org/mozilla-central/rev/9f8e74292115b4fbbb41698bfe9a7d8cc12b31cf/layout/base/nsLayoutUtils.cpp#7332,7335) and [HTMLVideoElement](https://searchfox.org/mozilla-central/rev/9f8e74292115b4fbbb41698bfe9a7d8cc12b31cf/layout/base/nsLayoutUtils.cpp#7433).
This is a follow-up bug for bug 1774300.

The  *HTMLImageElement*'s result of having cross-origin redirects or not is different from the one obtained in *HTMLVideoElement* in the same situation.

If the *HTMLImageElement*'s `src`  is in a cross-origin domain but redirected to the same domain, then it thinks it has **no** cross-origin redirect. However, in the same case, the *HTMLVideoElement* consider the `src` **has** a cross-origin redirect.

This is found during implementing `VideoFrame` when I was trying to use the `nsLayoutUtils::SurfaceFromElement` for [HTMLImageElement](https://searchfox.org/mozilla-central/rev/9f8e74292115b4fbbb41698bfe9a7d8cc12b31cf/layout/base/nsLayoutUtils.cpp#7332,7335) and [HTMLVideoElement](https://searchfox.org/mozilla-central/rev/9f8e74292115b4fbbb41698bfe9a7d8cc12b31cf/layout/base/nsLayoutUtils.cpp#7433).

Back to Bug 1789878 Comment 0