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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 bool complete() const; | 73 bool complete() const; |
74 | 74 |
75 bool hasPendingActivity() const { return m_imageLoader.hasPendingActivity();
} | 75 bool hasPendingActivity() const { return m_imageLoader.hasPendingActivity();
} |
76 | 76 |
77 virtual bool canContainRangeEndPoint() const { return false; } | 77 virtual bool canContainRangeEndPoint() const { return false; } |
78 | 78 |
79 void addClient(ImageLoaderClient* client) { m_imageLoader.addClient(client);
} | 79 void addClient(ImageLoaderClient* client) { m_imageLoader.addClient(client);
} |
80 void removeClient(ImageLoaderClient* client) { m_imageLoader.removeClient(cl
ient); } | 80 void removeClient(ImageLoaderClient* client) { m_imageLoader.removeClient(cl
ient); } |
81 | 81 |
| 82 virtual const AtomicString imageSourceURL() const OVERRIDE; |
| 83 |
82 protected: | 84 protected: |
83 HTMLImageElement(const QualifiedName&, Document*, HTMLFormElement* = 0); | 85 HTMLImageElement(const QualifiedName&, Document*, HTMLFormElement* = 0); |
84 | 86 |
85 virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE; | 87 virtual void didMoveToNewDocument(Document* oldDocument) OVERRIDE; |
86 | 88 |
87 private: | 89 private: |
88 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } | 90 virtual bool areAuthorShadowsAllowed() const OVERRIDE { return false; } |
89 | 91 |
90 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 92 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
91 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; | 93 virtual bool isPresentationAttribute(const QualifiedName&) const OVERRIDE; |
(...skipping 13 matching lines...) Expand all Loading... |
105 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 107 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
106 virtual void removedFrom(ContainerNode*) OVERRIDE; | 108 virtual void removedFrom(ContainerNode*) OVERRIDE; |
107 virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; } | 109 virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; } |
108 virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true;
} | 110 virtual bool shouldRegisterAsExtraNamedItem() const OVERRIDE { return true;
} |
109 | 111 |
110 virtual Image* imageContents() OVERRIDE; | 112 virtual Image* imageContents() OVERRIDE; |
111 | 113 |
112 HTMLImageLoader m_imageLoader; | 114 HTMLImageLoader m_imageLoader; |
113 HTMLFormElement* m_form; | 115 HTMLFormElement* m_form; |
114 CompositeOperator m_compositeOperator; | 116 CompositeOperator m_compositeOperator; |
| 117 AtomicString m_bestFitImageURL; |
115 }; | 118 }; |
116 | 119 |
117 inline HTMLImageElement* toHTMLImageElement(Node* node) | 120 inline HTMLImageElement* toHTMLImageElement(Node* node) |
118 { | 121 { |
119 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::imgTag
)); | 122 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::imgTag
)); |
120 return static_cast<HTMLImageElement*>(node); | 123 return static_cast<HTMLImageElement*>(node); |
121 } | 124 } |
122 | 125 |
123 inline const HTMLImageElement* toHTMLImageElement(const Node* node) | 126 inline const HTMLImageElement* toHTMLImageElement(const Node* node) |
124 { | 127 { |
125 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::imgTag
)); | 128 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(HTMLNames::imgTag
)); |
126 return static_cast<const HTMLImageElement*>(node); | 129 return static_cast<const HTMLImageElement*>(node); |
127 } | 130 } |
128 | 131 |
129 } //namespace | 132 } //namespace |
130 | 133 |
131 #endif | 134 #endif |
OLD | NEW |