| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Side effect: ensures decoded image is in cache, therefore should only be
called when about to draw the image. | 64 // Side effect: ensures decoded image is in cache, therefore should only be
called when about to draw the image. |
| 65 // FIXME: Decoding image on the main thread is expensive, so rather than for
cing decode, consider returning false | 65 // FIXME: Decoding image on the main thread is expensive, so rather than for
cing decode, consider returning false |
| 66 // when image is not decoded yet, as we do in case of deferred decoding. | 66 // when image is not decoded yet, as we do in case of deferred decoding. |
| 67 bool currentFrameKnownToBeOpaque(const LayoutObject*); | 67 bool currentFrameKnownToBeOpaque(const LayoutObject*); |
| 68 | 68 |
| 69 static std::pair<blink::Image*, float> brokenImage(float deviceScaleFactor);
// Returns an image and the image's resolution scale factor. | 69 static std::pair<blink::Image*, float> brokenImage(float deviceScaleFactor);
// Returns an image and the image's resolution scale factor. |
| 70 bool willPaintBrokenImage() const; | 70 bool willPaintBrokenImage() const; |
| 71 | 71 |
| 72 bool canRender(const LayoutObject& layoutObject, float multiplier) { return
!errorOccurred() && !imageSizeForLayoutObject(&layoutObject, multiplier).isEmpty
(); } | 72 bool canRender(const LayoutObject& layoutObject, float multiplier) { return
!errorOccurred() && !imageSizeForLayoutObject(&layoutObject, multiplier).isEmpty
(); } |
| 73 | 73 |
| 74 void setContainerSizeForLayoutObject(const ImageResourceClient*, const IntSi
ze&, float); | 74 void setContainerParametersForLayoutObject(const ImageResourceClient*, const
IntSize&, float, const KURL&); |
| 75 bool usesImageContainerSize() const; | 75 bool usesImageContainerSize() const; |
| 76 bool imageHasRelativeWidth() const; | 76 bool imageHasRelativeWidth() const; |
| 77 bool imageHasRelativeHeight() const; | 77 bool imageHasRelativeHeight() const; |
| 78 // The device pixel ratio we got from the server for this image, or 1.0. | 78 // The device pixel ratio we got from the server for this image, or 1.0. |
| 79 float devicePixelRatioHeaderValue() const { return m_devicePixelRatioHeaderV
alue; } | 79 float devicePixelRatioHeaderValue() const { return m_devicePixelRatioHeaderV
alue; } |
| 80 bool hasDevicePixelRatioHeaderValue() const { return m_hasDevicePixelRatioHe
aderValue; } | 80 bool hasDevicePixelRatioHeaderValue() const { return m_hasDevicePixelRatioHe
aderValue; } |
| 81 | 81 |
| 82 enum SizeType { | 82 enum SizeType { |
| 83 NormalSize, // Report the size of the image associated with a certain la
youtObject | 83 NormalSize, // Report the size of the image associated with a certain la
youtObject |
| 84 IntrinsicSize, // Report the intrinsic size, i.e. ignore whatever has be
en set extrinsically. | 84 IntrinsicSize, // Report the intrinsic size, i.e. ignore whatever has be
en set extrinsically. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 RefPtr<blink::Image> m_image; | 153 RefPtr<blink::Image> m_image; |
| 154 bool m_hasDevicePixelRatioHeaderValue; | 154 bool m_hasDevicePixelRatioHeaderValue; |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 DEFINE_RESOURCE_TYPE_CASTS(Image); | 157 DEFINE_RESOURCE_TYPE_CASTS(Image); |
| 158 | 158 |
| 159 } | 159 } |
| 160 | 160 |
| 161 #endif | 161 #endif |
| OLD | NEW |