| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 virtual ~ImageResource(); | 52 virtual ~ImageResource(); |
| 53 | 53 |
| 54 virtual void load(ResourceFetcher*, const ResourceLoaderOptions&) override; | 54 virtual void load(ResourceFetcher*, const ResourceLoaderOptions&) override; |
| 55 | 55 |
| 56 blink::Image* image(); // Returns the nullImage() if the image is not availa
ble yet. | 56 blink::Image* image(); // Returns the nullImage() if the image is not availa
ble yet. |
| 57 blink::Image* imageForRenderer(const RenderObject*); // Returns the nullImag
e() if the image is not available yet. | 57 blink::Image* imageForRenderer(const RenderObject*); // Returns the nullImag
e() if the image is not available yet. |
| 58 bool hasImage() const { return m_image.get(); } | 58 bool hasImage() const { return m_image.get(); } |
| 59 bool currentFrameKnownToBeOpaque(const RenderObject*); // Side effect: ensur
es decoded image is in cache, therefore should only be called when about to draw
the image. | 59 bool currentFrameKnownToBeOpaque(const RenderObject*); // Side effect: ensur
es decoded image is in cache, therefore should only be called when about to draw
the image. |
| 60 | 60 |
| 61 static std::pair<blink::Image*, float> brokenImage(float deviceScaleFactor);
// Returns an image and the image's resolution scale factor. | 61 static std::pair<blink::Image*, float> brokenImage(float deviceScaleFactor);
// Returns an image and the image's resolution scale factor. |
| 62 bool willPaintBrokenImage() const; | |
| 63 | 62 |
| 64 bool canRender(const RenderObject& renderer) { return !errorOccurred() && !i
mageSizeForRenderer(&renderer).isEmpty(); } | 63 bool canRender(const RenderObject& renderer) { return !errorOccurred() && !i
mageSizeForRenderer(&renderer).isEmpty(); } |
| 65 | 64 |
| 66 void setContainerSizeForRenderer(const ImageResourceClient*, const IntSize&)
; | 65 void setContainerSizeForRenderer(const ImageResourceClient*, const IntSize&)
; |
| 67 bool usesImageContainerSize() const; | 66 bool usesImageContainerSize() const; |
| 68 bool imageHasRelativeWidth() const; | 67 bool imageHasRelativeWidth() const; |
| 69 bool imageHasRelativeHeight() const; | 68 bool imageHasRelativeHeight() const; |
| 70 // The device pixel ratio we got from the server for this image, or 1.0. | 69 // The device pixel ratio we got from the server for this image, or 1.0. |
| 71 float devicePixelRatioHeaderValue() const { return m_devicePixelRatioHeaderV
alue; } | 70 float devicePixelRatioHeaderValue() const { return m_devicePixelRatioHeaderV
alue; } |
| 72 bool hasDevicePixelRatioHeaderValue() const { return m_hasDevicePixelRatioHe
aderValue; } | 71 bool hasDevicePixelRatioHeaderValue() const { return m_hasDevicePixelRatioHe
aderValue; } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 RefPtr<blink::Image> m_image; | 124 RefPtr<blink::Image> m_image; |
| 126 bool m_loadingMultipartContent; | 125 bool m_loadingMultipartContent; |
| 127 bool m_hasDevicePixelRatioHeaderValue; | 126 bool m_hasDevicePixelRatioHeaderValue; |
| 128 }; | 127 }; |
| 129 | 128 |
| 130 DEFINE_RESOURCE_TYPE_CASTS(Image); | 129 DEFINE_RESOURCE_TYPE_CASTS(Image); |
| 131 | 130 |
| 132 } | 131 } |
| 133 | 132 |
| 134 #endif | 133 #endif |
| OLD | NEW |