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 47 matching lines...) Loading... |
58 std::pair<Image*, float> brokenImage(float deviceScaleFactor) const; // Retu
rns an image and the image's resolution scale factor. | 58 std::pair<Image*, float> brokenImage(float deviceScaleFactor) const; // Retu
rns an image and the image's resolution scale factor. |
59 bool willPaintBrokenImage() const; | 59 bool willPaintBrokenImage() const; |
60 | 60 |
61 bool canRender(const RenderObject* renderer, float multiplier) { return !err
orOccurred() && !imageSizeForRenderer(renderer, multiplier).isEmpty(); } | 61 bool canRender(const RenderObject* renderer, float multiplier) { return !err
orOccurred() && !imageSizeForRenderer(renderer, multiplier).isEmpty(); } |
62 | 62 |
63 void setContainerSizeForRenderer(const CachedImageClient*, const IntSize&, f
loat); | 63 void setContainerSizeForRenderer(const CachedImageClient*, const IntSize&, f
loat); |
64 bool usesImageContainerSize() const; | 64 bool usesImageContainerSize() const; |
65 bool imageHasRelativeWidth() const; | 65 bool imageHasRelativeWidth() const; |
66 bool imageHasRelativeHeight() const; | 66 bool imageHasRelativeHeight() const; |
67 | 67 |
| 68 enum SizeType { |
| 69 NormalSize, // Report the size of the image associated with a certain re
nderer |
| 70 IntrinsicSize // Report the intrinsic size, i.e. ignore whatever has bee
n set extrinsically. |
| 71 }; |
68 // This method takes a zoom multiplier that can be used to increase the natu
ral size of the image by the zoom. | 72 // This method takes a zoom multiplier that can be used to increase the natu
ral size of the image by the zoom. |
69 LayoutSize imageSizeForRenderer(const RenderObject*, float multiplier); // r
eturns the size of the complete image. | 73 LayoutSize imageSizeForRenderer(const RenderObject*, float multiplier, SizeT
ype = NormalSize); // returns the size of the complete image. |
70 void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHei
ght, FloatSize& intrinsicRatio); | 74 void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intrinsicHei
ght, FloatSize& intrinsicRatio); |
71 | 75 |
72 virtual void didAddClient(ResourceClient*); | 76 virtual void didAddClient(ResourceClient*); |
73 virtual void didRemoveClient(ResourceClient*); | 77 virtual void didRemoveClient(ResourceClient*); |
74 | 78 |
75 virtual void allClientsRemoved(); | 79 virtual void allClientsRemoved(); |
76 virtual void destroyDecodedData(); | 80 virtual void destroyDecodedData(); |
77 | 81 |
78 virtual void appendData(const char*, int) OVERRIDE; | 82 virtual void appendData(const char*, int) OVERRIDE; |
79 virtual void error(Resource::Status); | 83 virtual void error(Resource::Status); |
(...skipping 31 matching lines...) Loading... |
111 ContainerSizeRequests m_pendingContainerSizeRequests; | 115 ContainerSizeRequests m_pendingContainerSizeRequests; |
112 | 116 |
113 RefPtr<Image> m_image; | 117 RefPtr<Image> m_image; |
114 OwnPtr<SVGImageCache> m_svgImageCache; | 118 OwnPtr<SVGImageCache> m_svgImageCache; |
115 bool m_loadingMultipartContent; | 119 bool m_loadingMultipartContent; |
116 }; | 120 }; |
117 | 121 |
118 } | 122 } |
119 | 123 |
120 #endif | 124 #endif |
OLD | NEW |