Bug 1501794 - Implement img decode API. r=bzbarsky,tnikkel
The img decode API allows a web author to request that an image be decoded at its intrinsic size and be notified when it has been completed. This is useful to ensure an image is ready to display before adding it to the DOM tree -- this will help reduce flickering. Differential Revision: https://phabricator.services.mozilla.com/D11362
This commit is contained in:
@@ -191,6 +191,10 @@ void HTMLImageElement::GetDecoding(nsAString& aValue) {
|
||||
GetEnumAttr(nsGkAtoms::decoding, kDecodingTableDefault->tag, aValue);
|
||||
}
|
||||
|
||||
already_AddRefed<Promise> HTMLImageElement::Decode(ErrorResult& aRv) {
|
||||
return nsImageLoadingContent::QueueDecodeAsync(aRv);
|
||||
}
|
||||
|
||||
bool HTMLImageElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
|
||||
const nsAString& aValue,
|
||||
nsIPrincipal* aMaybeScriptedPrincipal,
|
||||
|
||||
Reference in New Issue
Block a user