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