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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 IntrinsicSize // Report the intrinsic size, i.e. ignore whatever has bee
n set extrinsically. | 81 IntrinsicSize // Report the intrinsic size, i.e. ignore whatever has bee
n set extrinsically. |
82 }; | 82 }; |
83 // This method takes a zoom multiplier that can be used to increase the natu
ral size of the image by the zoom. | 83 // This method takes a zoom multiplier that can be used to increase the natu
ral size of the image by the zoom. |
84 LayoutSize imageSizeForRenderer(const RenderObject*, float multiplier, SizeT
ype = NormalSize); // returns the size of the complete image. | 84 LayoutSize imageSizeForRenderer(const RenderObject*, float multiplier, SizeT
ype = NormalSize); // returns the size of the complete image. |
85 void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHei
ght, FloatSize& intrinsicRatio); | 85 void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHei
ght, FloatSize& intrinsicRatio); |
86 | 86 |
87 static void updateBitmapImages(HashSet<ImageResource*>&, bool redecodeImages
= false); | 87 static void updateBitmapImages(HashSet<ImageResource*>&, bool redecodeImages
= false); |
88 | 88 |
89 bool isAccessAllowed(ExecutionContext*, SecurityOrigin*); | 89 bool isAccessAllowed(ExecutionContext*, SecurityOrigin*); |
90 | 90 |
| 91 void updateImageAnimationPolicy(); |
| 92 |
91 virtual void didAddClient(ResourceClient*) override; | 93 virtual void didAddClient(ResourceClient*) override; |
92 virtual void didRemoveClient(ResourceClient*) override; | 94 virtual void didRemoveClient(ResourceClient*) override; |
93 | 95 |
94 virtual void allClientsRemoved() override; | 96 virtual void allClientsRemoved() override; |
95 | 97 |
96 virtual void appendData(const char*, unsigned) override; | 98 virtual void appendData(const char*, unsigned) override; |
97 virtual void error(Resource::Status) override; | 99 virtual void error(Resource::Status) override; |
98 virtual void responseReceived(const ResourceResponse&, PassOwnPtr<WebDataCon
sumerHandle>) override; | 100 virtual void responseReceived(const ResourceResponse&, PassOwnPtr<WebDataCon
sumerHandle>) override; |
99 virtual void finishOnePart() override; | 101 virtual void finishOnePart() override; |
100 | 102 |
101 // For compatibility, images keep loading even if there are HTTP errors. | 103 // For compatibility, images keep loading even if there are HTTP errors. |
102 virtual bool shouldIgnoreHTTPStatusCodeErrors() const override { return true
; } | 104 virtual bool shouldIgnoreHTTPStatusCodeErrors() const override { return true
; } |
103 | 105 |
104 virtual bool isImage() const override { return true; } | 106 virtual bool isImage() const override { return true; } |
105 virtual bool stillNeedsLoad() const override { return !errorOccurred() && st
atus() == Unknown && !isLoading(); } | 107 virtual bool stillNeedsLoad() const override { return !errorOccurred() && st
atus() == Unknown && !isLoading(); } |
106 | 108 |
107 // ImageObserver | 109 // ImageObserver |
108 virtual void decodedSizeChanged(const blink::Image*, int delta) override; | 110 virtual void decodedSizeChanged(const blink::Image*, int delta) override; |
109 virtual void didDraw(const blink::Image*) override; | 111 virtual void didDraw(const blink::Image*) override; |
110 | 112 |
111 virtual bool shouldPauseAnimation(const blink::Image*) override; | 113 virtual bool shouldPauseAnimation(const blink::Image*) override; |
112 virtual void animationAdvanced(const blink::Image*) override; | 114 virtual void animationAdvanced(const blink::Image*) override; |
113 virtual void imageAnimationPolicy(const blink::Image*, ImageAnimationPolicy&
) override; | |
114 virtual void changedInRect(const blink::Image*, const IntRect&) override; | 115 virtual void changedInRect(const blink::Image*, const IntRect&) override; |
115 | 116 |
116 protected: | 117 protected: |
117 virtual bool isSafeToUnlock() const override; | 118 virtual bool isSafeToUnlock() const override; |
118 virtual void destroyDecodedDataIfPossible() override; | 119 virtual void destroyDecodedDataIfPossible() override; |
119 | 120 |
120 private: | 121 private: |
121 void clear(); | 122 void clear(); |
122 | 123 |
123 void setCustomAcceptHeader(); | 124 void setCustomAcceptHeader(); |
(...skipping 14 matching lines...) Expand all Loading... |
138 OwnPtr<SVGImageCache> m_svgImageCache; | 139 OwnPtr<SVGImageCache> m_svgImageCache; |
139 bool m_loadingMultipartContent; | 140 bool m_loadingMultipartContent; |
140 bool m_hasDevicePixelRatioHeaderValue; | 141 bool m_hasDevicePixelRatioHeaderValue; |
141 }; | 142 }; |
142 | 143 |
143 DEFINE_RESOURCE_TYPE_CASTS(Image); | 144 DEFINE_RESOURCE_TYPE_CASTS(Image); |
144 | 145 |
145 } | 146 } |
146 | 147 |
147 #endif | 148 #endif |
OLD | NEW |