| OLD | NEW |
| 1 /* | 1 /* |
| 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
| 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
| 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007 Apple 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 LayoutSize imageSize(RespectImageOrientationEnum shouldRespectImageOrientati
on, float multiplier, SizeType = IntrinsicSize); | 83 LayoutSize imageSize(RespectImageOrientationEnum shouldRespectImageOrientati
on, float multiplier, SizeType = IntrinsicSize); |
| 84 | 84 |
| 85 bool isAccessAllowed(SecurityOrigin*); | 85 bool isAccessAllowed(SecurityOrigin*); |
| 86 | 86 |
| 87 void updateImageAnimationPolicy(); | 87 void updateImageAnimationPolicy(); |
| 88 | 88 |
| 89 // If this ImageResource has the Lo-Fi response headers, reload it with | 89 // If this ImageResource has the Lo-Fi response headers, reload it with |
| 90 // the Lo-Fi state set to off and bypassing the cache. | 90 // the Lo-Fi state set to off and bypassing the cache. |
| 91 void reloadIfLoFi(ResourceFetcher*); | 91 void reloadIfLoFi(ResourceFetcher*); |
| 92 | 92 |
| 93 void didAddClient(ResourceClient*) override; |
| 94 |
| 93 void addObserver(ImageResourceObserver*); | 95 void addObserver(ImageResourceObserver*); |
| 94 void removeObserver(ImageResourceObserver*); | 96 void removeObserver(ImageResourceObserver*); |
| 95 bool hasClientsOrObservers() const override { return Resource::hasClientsOrO
bservers() || !m_observers.isEmpty() || !m_finishedObservers.isEmpty(); } | 97 bool hasClientsOrObservers() const override { return Resource::hasClientsOrO
bservers() || !m_observers.isEmpty() || !m_finishedObservers.isEmpty(); } |
| 96 | 98 |
| 97 ResourcePriority priorityFromObservers() override; | 99 ResourcePriority priorityFromObservers() override; |
| 98 | 100 |
| 99 void allClientsAndObserversRemoved() override; | 101 void allClientsAndObserversRemoved() override; |
| 100 | 102 |
| 101 void appendData(const char*, size_t) override; | 103 void appendData(const char*, size_t) override; |
| 102 void error(const ResourceError&) override; | 104 void error(const ResourceError&) override; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 152 |
| 151 void clear(); | 153 void clear(); |
| 152 | 154 |
| 153 void createImage(); | 155 void createImage(); |
| 154 void updateImage(bool allDataReceived); | 156 void updateImage(bool allDataReceived); |
| 155 void updateImageAndClearBuffer(); | 157 void updateImageAndClearBuffer(); |
| 156 void clearImage(); | 158 void clearImage(); |
| 157 // If not null, changeRect is the changed part of the image. | 159 // If not null, changeRect is the changed part of the image. |
| 158 void notifyObservers(const IntRect* changeRect = nullptr); | 160 void notifyObservers(const IntRect* changeRect = nullptr); |
| 159 | 161 |
| 162 void ensureImage(); |
| 163 |
| 160 void checkNotify() override; | 164 void checkNotify() override; |
| 161 void markClientsAndObserversFinished() override; | 165 void markClientsAndObserversFinished() override; |
| 162 | 166 |
| 163 void doResetAnimation(); | 167 void doResetAnimation(); |
| 164 | 168 |
| 165 float m_devicePixelRatioHeaderValue; | 169 float m_devicePixelRatioHeaderValue; |
| 166 | 170 |
| 167 Member<MultipartImageResourceParser> m_multipartParser; | 171 Member<MultipartImageResourceParser> m_multipartParser; |
| 168 RefPtr<blink::Image> m_image; | 172 RefPtr<blink::Image> m_image; |
| 169 MultipartParsingState m_multipartParsingState = MultipartParsingState::Waiti
ngForFirstPart; | 173 MultipartParsingState m_multipartParsingState = MultipartParsingState::Waiti
ngForFirstPart; |
| 170 bool m_hasDevicePixelRatioHeaderValue; | 174 bool m_hasDevicePixelRatioHeaderValue; |
| 171 HashCountedSet<ImageResourceObserver*> m_observers; | 175 HashCountedSet<ImageResourceObserver*> m_observers; |
| 172 HashCountedSet<ImageResourceObserver*> m_finishedObservers; | 176 HashCountedSet<ImageResourceObserver*> m_finishedObservers; |
| 173 }; | 177 }; |
| 174 | 178 |
| 175 DEFINE_RESOURCE_TYPE_CASTS(Image); | 179 DEFINE_RESOURCE_TYPE_CASTS(Image); |
| 176 | 180 |
| 177 } // namespace blink | 181 } // namespace blink |
| 178 | 182 |
| 179 #endif | 183 #endif |
| OLD | NEW |