mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
[DOM] When failing to create a channel and an image request, make sure to set
the image blocking status appropriately. This is the same status as we do for known no-data protocols and ensures we treat these two cases the same.
This commit is contained in:
parent
078536b2bb
commit
e77b184480
4 changed files with 9 additions and 1 deletions
|
|
@ -932,8 +932,12 @@ nsImageLoadingContent::LoadImage(nsIURI* aNewURI,
|
|||
MOZ_ASSERT(!req, "Shouldn't have non-null request here");
|
||||
// If we don't have a current URI, we might as well store this URI so people
|
||||
// know what we tried (and failed) to load.
|
||||
if (!mCurrentRequest)
|
||||
if (!mCurrentRequest) {
|
||||
mCurrentURI = aNewURI;
|
||||
if (mImageBlockingStatus == nsIContentPolicy::ACCEPT) {
|
||||
mImageBlockingStatus = nsIContentPolicy::REJECT_REQUEST;
|
||||
}
|
||||
}
|
||||
|
||||
FireEvent(NS_LITERAL_STRING("error"));
|
||||
FireEvent(NS_LITERAL_STRING("loadend"));
|
||||
|
|
|
|||
|
|
@ -126,3 +126,5 @@ fuzzy(1,1) == image-orientation-background.html?90&flip image-orientation-r
|
|||
|
||||
== image-resize-percent-height.html image-resize-ref.html
|
||||
== image-resize-percent-width.html image-resize-ref.html
|
||||
|
||||
== unknown-protocol.html unknown-protocol-ref.html
|
||||
|
|
|
|||
1
layout/reftests/image/unknown-protocol-ref.html
Normal file
1
layout/reftests/image/unknown-protocol-ref.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<img src="mailto://foo">
|
||||
1
layout/reftests/image/unknown-protocol.html
Normal file
1
layout/reftests/image/unknown-protocol.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<img src="foobar://baz">
|
||||
Loading…
Add table
Add a link
Reference in a new issue