| 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, 2009 Apple Inc. All rights reserved. | 4 * Copyright (C) 2004, 2009 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 UpdateIgnorePreviousError, | 74 UpdateIgnorePreviousError, |
| 75 // This forces the image to update its intrinsic size, even if the image
source has not changed. | 75 // This forces the image to update its intrinsic size, even if the image
source has not changed. |
| 76 UpdateSizeChanged | 76 UpdateSizeChanged |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 enum BypassMainWorldBehavior { | 79 enum BypassMainWorldBehavior { |
| 80 BypassMainWorldCSP, | 80 BypassMainWorldCSP, |
| 81 DoNotBypassMainWorldCSP | 81 DoNotBypassMainWorldCSP |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 void updateFromElement(UpdateFromElementBehavior = UpdateNormal); | 84 void updateFromElement(UpdateFromElementBehavior = UpdateNormal, bool bypass
Cache = false); |
| 85 | 85 |
| 86 void elementDidMoveToNewDocument(); | 86 void elementDidMoveToNewDocument(); |
| 87 | 87 |
| 88 Element* element() const { return m_element; } | 88 Element* element() const { return m_element; } |
| 89 bool imageComplete() const | 89 bool imageComplete() const |
| 90 { | 90 { |
| 91 return m_imageComplete && !m_pendingTask; | 91 return m_imageComplete && !m_pendingTask; |
| 92 } | 92 } |
| 93 | 93 |
| 94 ImageResource* image() const { return m_image.get(); } | 94 ImageResource* image() const { return m_image.get(); } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 108 | 108 |
| 109 void addClient(ImageLoaderClient*); | 109 void addClient(ImageLoaderClient*); |
| 110 void removeClient(ImageLoaderClient*); | 110 void removeClient(ImageLoaderClient*); |
| 111 protected: | 111 protected: |
| 112 virtual void notifyFinished(Resource*) override; | 112 virtual void notifyFinished(Resource*) override; |
| 113 | 113 |
| 114 private: | 114 private: |
| 115 class Task; | 115 class Task; |
| 116 | 116 |
| 117 // Called from the task or from updateFromElement to initiate the load. | 117 // Called from the task or from updateFromElement to initiate the load. |
| 118 void doUpdateFromElement(BypassMainWorldBehavior, UpdateFromElementBehavior)
; | 118 void doUpdateFromElement(BypassMainWorldBehavior, UpdateFromElementBehavior,
bool bypassCache); |
| 119 | 119 |
| 120 virtual void dispatchLoadEvent() = 0; | 120 virtual void dispatchLoadEvent() = 0; |
| 121 virtual String sourceURI(const AtomicString&) const = 0; | 121 virtual String sourceURI(const AtomicString&) const = 0; |
| 122 virtual void noImageResourceToLoad() { }; | 122 virtual void noImageResourceToLoad() { }; |
| 123 | 123 |
| 124 void updatedHasPendingEvent(); | 124 void updatedHasPendingEvent(); |
| 125 | 125 |
| 126 void dispatchPendingLoadEvent(); | 126 void dispatchPendingLoadEvent(); |
| 127 void dispatchPendingErrorEvent(); | 127 void dispatchPendingErrorEvent(); |
| 128 | 128 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 bool m_imageComplete : 1; | 182 bool m_imageComplete : 1; |
| 183 bool m_loadingImageDocument : 1; | 183 bool m_loadingImageDocument : 1; |
| 184 bool m_elementIsProtected : 1; | 184 bool m_elementIsProtected : 1; |
| 185 bool m_suppressErrorEvents : 1; | 185 bool m_suppressErrorEvents : 1; |
| 186 unsigned m_highPriorityClientCount; | 186 unsigned m_highPriorityClientCount; |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 } | 189 } |
| 190 | 190 |
| 191 #endif | 191 #endif |
| OLD | NEW |