OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2008, 2010 Apple Inc. All rights reserved. |
5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 11 matching lines...) Expand all Loading... |
22 */ | 22 */ |
23 | 23 |
24 #ifndef HTMLImageElement_h | 24 #ifndef HTMLImageElement_h |
25 #define HTMLImageElement_h | 25 #define HTMLImageElement_h |
26 | 26 |
27 #include "core/CoreExport.h" | 27 #include "core/CoreExport.h" |
28 #include "core/html/HTMLElement.h" | 28 #include "core/html/HTMLElement.h" |
29 #include "core/html/HTMLImageLoader.h" | 29 #include "core/html/HTMLImageLoader.h" |
30 #include "core/html/canvas/CanvasImageSource.h" | 30 #include "core/html/canvas/CanvasImageSource.h" |
31 #include "platform/graphics/GraphicsTypes.h" | 31 #include "platform/graphics/GraphicsTypes.h" |
| 32 #include "platform/network/ResourceResponse.h" |
32 #include "wtf/WeakPtr.h" | 33 #include "wtf/WeakPtr.h" |
33 | 34 |
34 namespace blink { | 35 namespace blink { |
35 | 36 |
36 class HTMLFormElement; | 37 class HTMLFormElement; |
37 class ImageCandidate; | 38 class ImageCandidate; |
38 class ShadowRoot; | 39 class ShadowRoot; |
39 | 40 |
40 class CORE_EXPORT HTMLImageElement final : public HTMLElement, public CanvasImag
eSource { | 41 class CORE_EXPORT HTMLImageElement final : public HTMLElement, public CanvasImag
eSource { |
41 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 virtual bool isOpaque() const override; | 103 virtual bool isOpaque() const override; |
103 | 104 |
104 // public so that HTMLPictureElement can call this as well. | 105 // public so that HTMLPictureElement can call this as well. |
105 void selectSourceURL(ImageLoader::UpdateFromElementBehavior); | 106 void selectSourceURL(ImageLoader::UpdateFromElementBehavior); |
106 void reattachFallbackContent(); | 107 void reattachFallbackContent(); |
107 void setUseFallbackContent(); | 108 void setUseFallbackContent(); |
108 void setIsFallbackImage() { m_isFallbackImage = true; } | 109 void setIsFallbackImage() { m_isFallbackImage = true; } |
109 | 110 |
110 float sourceSize(Element&); | 111 float sourceSize(Element&); |
111 | 112 |
| 113 void forceReload() const; |
| 114 |
112 protected: | 115 protected: |
113 explicit HTMLImageElement(Document&, HTMLFormElement* = 0, bool createdByPar
ser = false); | 116 explicit HTMLImageElement(Document&, HTMLFormElement* = 0, bool createdByPar
ser = false); |
114 | 117 |
115 virtual void didMoveToNewDocument(Document& oldDocument) override; | 118 virtual void didMoveToNewDocument(Document& oldDocument) override; |
116 virtual bool useFallbackContent() const { return m_useFallbackContent; } | 119 virtual bool useFallbackContent() const { return m_useFallbackContent; } |
117 | 120 |
118 virtual void didAddUserAgentShadowRoot(ShadowRoot&) override; | 121 virtual void didAddUserAgentShadowRoot(ShadowRoot&) override; |
119 virtual PassRefPtr<ComputedStyle> customStyleForLayoutObject() override; | 122 virtual PassRefPtr<ComputedStyle> customStyleForLayoutObject() override; |
120 private: | 123 private: |
121 virtual bool areAuthorShadowsAllowed() const override { return false; } | 124 virtual bool areAuthorShadowsAllowed() const override { return false; } |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 unsigned m_elementCreatedByParser : 1; | 165 unsigned m_elementCreatedByParser : 1; |
163 // Intrinsic sizing is viewport dependant if the 'w' descriptor was used for
the picked resource. | 166 // Intrinsic sizing is viewport dependant if the 'w' descriptor was used for
the picked resource. |
164 unsigned m_intrinsicSizingViewportDependant : 1; | 167 unsigned m_intrinsicSizingViewportDependant : 1; |
165 unsigned m_useFallbackContent : 1; | 168 unsigned m_useFallbackContent : 1; |
166 unsigned m_isFallbackImage : 1; | 169 unsigned m_isFallbackImage : 1; |
167 }; | 170 }; |
168 | 171 |
169 } // namespace blink | 172 } // namespace blink |
170 | 173 |
171 #endif // HTMLImageElement_h | 174 #endif // HTMLImageElement_h |
OLD | NEW |