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 f4a5c8c901d8695641345da02626b0bb2929f7e4..00648aba18c68015f8def1aebf910bfbe6043d01 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/FetchRequest.h" |
#include "platform/loader/fetch/ResourceResponse.h" |
@@ -99,6 +100,8 @@ class CORE_EXPORT HTMLImageElement final |
int x() const; |
int y() const; |
+ ScriptPromise decode(ScriptState*, ExceptionState&); |
+ |
bool complete() const; |
bool hasPendingActivity() const final { |
@@ -141,6 +144,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 |
@@ -201,6 +206,9 @@ class CORE_EXPORT HTMLImageElement final |
void notifyViewportChanged(); |
void createMediaQueryListIfDoesNotExist(); |
+ void requestDecode(); |
+ void didDecode(bool success); |
+ |
Member<HTMLImageLoader> m_imageLoader; |
Member<ViewportChangeListener> m_listener; |
Member<HTMLFormElement> m_form; |
@@ -211,8 +219,11 @@ class CORE_EXPORT HTMLImageElement final |
unsigned m_formWasSetByParser : 1; |
unsigned m_elementCreatedByParser : 1; |
unsigned m_isFallbackImage : 1; |
+ HeapVector<Member<ScriptPromiseResolver>> m_decodePromiseResolvers; |
ReferrerPolicy m_referrerPolicy; |
+ |
+ WTF::WeakPtrFactory<HTMLImageElement> m_weakPtrFactory; |
}; |
} // namespace blink |