Index: third_party/WebKit/Source/core/html/HTMLImageElement.h |
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.h b/third_party/WebKit/Source/core/html/HTMLImageElement.h |
index a85704f6f9d78973489f94032d4cdfaf13dd71cf..179ce6b7e4bb15efe41ccabfe6f9164695d4d455 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLImageElement.h |
+++ b/third_party/WebKit/Source/core/html/HTMLImageElement.h |
@@ -32,6 +32,7 @@ |
#include "core/html/canvas/CanvasImageElementSource.h" |
#include "core/imagebitmap/ImageBitmapSource.h" |
#include "platform/graphics/GraphicsTypes.h" |
+#include "platform/heap/HeapAllocator.h" |
#include "platform/loader/fetch/FetchParameters.h" |
#include "platform/loader/fetch/ResourceResponse.h" |
@@ -102,6 +103,8 @@ class CORE_EXPORT HTMLImageElement final |
int x() const; |
int y() const; |
+ ScriptPromise decode(ScriptState*, ExceptionState&); |
+ |
bool complete() const; |
bool HasPendingActivity() const final { |
@@ -144,6 +147,8 @@ class CORE_EXPORT HTMLImageElement final |
FormAssociated* ToFormAssociatedOrNull() override { return this; }; |
void AssociateWith(HTMLFormElement*) override; |
+ void ImageNotifyFinished(bool success); |
+ |
protected: |
// Controls how an image element appears in the layout. See: |
// https://html.spec.whatwg.org/multipage/embedded-content.html#image-request |
@@ -196,6 +201,9 @@ class CORE_EXPORT HTMLImageElement final |
bool IsInteractiveContent() const override; |
Image* ImageContents() override; |
+ void RequestDecode(); |
+ void DidDecode(uint32_t sequence_id, bool success); |
+ |
void ResetFormOwner(); |
ImageCandidate FindBestFitImageFromPictureParent(); |
void SetBestFitURLAndDPRFromImageCandidate(const ImageCandidate&); |
@@ -210,6 +218,8 @@ class CORE_EXPORT HTMLImageElement final |
float image_device_pixel_ratio_; |
Member<HTMLSourceElement> source_; |
LayoutDisposition layout_disposition_; |
+ HeapVector<Member<ScriptPromiseResolver>> decode_promise_resolvers_; |
+ uint32_t decode_sequence_id_; |
unsigned form_was_set_by_parser_ : 1; |
unsigned element_created_by_parser_ : 1; |
unsigned is_fallback_image_ : 1; |