Index: Source/core/html/HTMLImageElement.h |
diff --git a/Source/core/html/HTMLImageElement.h b/Source/core/html/HTMLImageElement.h |
index 1fceb3d75797573aed9677d44a935dc4aaa4340f..1c9972ad611232fd83df9732ba8b167ef9c67190 100644 |
--- a/Source/core/html/HTMLImageElement.h |
+++ b/Source/core/html/HTMLImageElement.h |
@@ -34,6 +34,7 @@ namespace blink { |
class HTMLFormElement; |
class ImageCandidate; |
+class ShadowRoot; |
class HTMLImageElement final : public HTMLElement, public CanvasImageSource { |
DEFINE_WRAPPERTYPEINFO(); |
@@ -56,7 +57,7 @@ public: |
bool isServerMap() const; |
- const AtomicString& altText() const; |
+ virtual String altText() const override final; |
ImageResource* cachedImage() const { return imageLoader().image(); } |
void setImageResource(ImageResource* i) { imageLoader().setImage(i); }; |
@@ -86,6 +87,8 @@ public: |
virtual HTMLFormElement* formOwner() const override; |
void formRemovedFromTree(const Node& formRoot); |
+ virtual void ensureFallbackContent(); |
+ virtual void ensurePrimaryContent(); |
// CanvasImageSourceImplementations |
virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceImageStatus*) const override; |
@@ -96,11 +99,18 @@ public: |
// public so that HTMLPictureElement can call this as well. |
void selectSourceURL(ImageLoader::UpdateFromElementBehavior); |
+ void reattachFallbackContent(); |
+ void setUseFallbackContent(); |
+ void setIsFallbackImage() { m_isFallbackImage = true; } |
+ |
protected: |
explicit HTMLImageElement(Document&, HTMLFormElement* = 0, bool createdByParser = false); |
virtual void didMoveToNewDocument(Document& oldDocument) override; |
+ virtual bool useFallbackContent() const { return m_useFallbackContent; } |
+ virtual void didAddUserAgentShadowRoot(ShadowRoot&) override; |
+ virtual PassRefPtr<RenderStyle> customStyleForRenderer() override; |
private: |
virtual bool areAuthorShadowsAllowed() const override { return false; } |
@@ -146,6 +156,8 @@ private: |
unsigned m_elementCreatedByParser : 1; |
// Intrinsic sizing is viewport dependant if the 'w' descriptor was used for the picked resource. |
unsigned m_intrinsicSizingViewportDependant : 1; |
+ unsigned m_useFallbackContent : 1; |
+ unsigned m_isFallbackImage : 1; |
}; |
} // namespace blink |