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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 USING_GARBAGE_COLLECTED_MIXIN(HTMLImageElement); | 49 USING_GARBAGE_COLLECTED_MIXIN(HTMLImageElement); |
50 | 50 |
51 public: | 51 public: |
52 class ViewportChangeListener; | 52 class ViewportChangeListener; |
53 | 53 |
54 static HTMLImageElement* create(Document&); | 54 static HTMLImageElement* create(Document&); |
55 static HTMLImageElement* create(Document&, | 55 static HTMLImageElement* create(Document&, |
56 HTMLFormElement*, | 56 HTMLFormElement*, |
57 bool createdByParser); | 57 bool createdByParser); |
58 static HTMLImageElement* createForJSConstructor(Document&); | 58 static HTMLImageElement* createForJSConstructor(Document&); |
59 static HTMLImageElement* createForJSConstructor(Document&, int width); | 59 static HTMLImageElement* createForJSConstructor(Document&, unsigned width); |
60 static HTMLImageElement* createForJSConstructor(Document&, | 60 static HTMLImageElement* createForJSConstructor(Document&, |
61 int width, | 61 unsigned width, |
62 int height); | 62 unsigned height); |
63 | 63 |
64 ~HTMLImageElement() override; | 64 ~HTMLImageElement() override; |
65 DECLARE_VIRTUAL_TRACE(); | 65 DECLARE_VIRTUAL_TRACE(); |
66 | 66 |
67 int width(); | 67 unsigned width(); |
68 int height(); | 68 unsigned height(); |
69 | 69 |
70 int naturalWidth() const; | 70 unsigned naturalWidth() const; |
71 int naturalHeight() const; | 71 unsigned naturalHeight() const; |
72 const String& currentSrc() const; | 72 const String& currentSrc() const; |
73 | 73 |
74 bool isServerMap() const; | 74 bool isServerMap() const; |
75 | 75 |
76 String altText() const final; | 76 String altText() const final; |
77 | 77 |
78 ImageResource* cachedImage() const { return imageLoader().image(); } | 78 ImageResource* cachedImage() const { return imageLoader().image(); } |
79 void setImageResource(ImageResource* i) { imageLoader().setImage(i); } | 79 void setImageResource(ImageResource* i) { imageLoader().setImage(i); } |
80 | 80 |
81 void setLoadingImageDocument() { imageLoader().setLoadingImageDocument(); } | 81 void setLoadingImageDocument() { imageLoader().setLoadingImageDocument(); } |
82 | 82 |
83 void setHeight(int); | 83 void setHeight(unsigned); |
84 | 84 |
85 KURL src() const; | 85 KURL src() const; |
86 void setSrc(const String&); | 86 void setSrc(const String&); |
87 | 87 |
88 void setWidth(int); | 88 void setWidth(unsigned); |
89 | 89 |
90 int x() const; | 90 int x() const; |
91 int y() const; | 91 int y() const; |
92 | 92 |
93 bool complete() const; | 93 bool complete() const; |
94 | 94 |
95 bool hasPendingActivity() const final { | 95 bool hasPendingActivity() const final { |
96 return imageLoader().hasPendingActivity(); | 96 return imageLoader().hasPendingActivity(); |
97 } | 97 } |
98 | 98 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 unsigned m_elementCreatedByParser : 1; | 197 unsigned m_elementCreatedByParser : 1; |
198 unsigned m_useFallbackContent : 1; | 198 unsigned m_useFallbackContent : 1; |
199 unsigned m_isFallbackImage : 1; | 199 unsigned m_isFallbackImage : 1; |
200 | 200 |
201 ReferrerPolicy m_referrerPolicy; | 201 ReferrerPolicy m_referrerPolicy; |
202 }; | 202 }; |
203 | 203 |
204 } // namespace blink | 204 } // namespace blink |
205 | 205 |
206 #endif // HTMLImageElement_h | 206 #endif // HTMLImageElement_h |
OLD | NEW |