Chromium Code Reviews| Index: Source/core/html/HTMLImageElement.h |
| diff --git a/Source/core/html/HTMLImageElement.h b/Source/core/html/HTMLImageElement.h |
| index 7b5d9a21699042b08fd862ba27b99ce2463e743d..e904c36f94b2a920fa6c20ef7faedc4a81c10567 100644 |
| --- a/Source/core/html/HTMLImageElement.h |
| +++ b/Source/core/html/HTMLImageElement.h |
| @@ -89,6 +89,8 @@ public: |
| virtual HTMLFormElement* formOwner() const OVERRIDE; |
| void formRemovedFromTree(const Node& formRoot); |
| + void ensureFallbackContent(); |
| + void ensurePrimaryContent(); |
| // CanvasImageSourceImplementations |
| virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceImageStatus*) const; |
| @@ -99,11 +101,18 @@ public: |
| // public so that HTMLPictureElement can call this as well. |
| void selectSourceURL(ImageLoader::UpdateFromElementBehavior); |
| + void reattachFallbackContent(); |
| + void setUseFallbackContent() { m_useFallbackContent = true; ensureUserAgentShadowRoot(); } |
| + 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; } |
| @@ -135,6 +144,7 @@ private: |
| HTMLImageLoader& imageLoader() const { return *m_imageLoader; } |
| void notifyViewportChanged(); |
| void createMediaQueryListIfDoesNotExist(); |
| + Text* altTextNode() { return m_altTextNode; } |
|
esprehn
2014/09/05 00:47:51
Remove this.
rhogan
2014/09/08 19:52:41
Not done. See note above.
|
| OwnPtrWillBeMember<HTMLImageLoader> m_imageLoader; |
| RefPtrWillBeMember<ViewportChangeListener> m_listener; |
| @@ -143,6 +153,7 @@ private: |
| #else |
| WeakPtr<HTMLFormElement> m_form; |
| #endif |
| + Text* m_altTextNode; |
|
esprehn
2014/09/05 00:47:51
ditto, use ids.
|
| CompositeOperator m_compositeOperator; |
| AtomicString m_bestFitImageURL; |
| float m_imageDevicePixelRatio; |
| @@ -152,6 +163,8 @@ private: |
| unsigned m_intrinsicSizingViewportDependant : 1; |
| // Effective size is viewport dependant if the sizes attribute's effective size used v* length units. |
| unsigned m_effectiveSizeViewportDependant : 1; |
| + unsigned m_useFallbackContent : 1; |
| + unsigned m_isFallbackImage : 1; |
| }; |
| } // namespace blink |