| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 2 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 virtual bool currentFrameIsLazyDecoded() { return false; } | 75 virtual bool currentFrameIsLazyDecoded() { return false; } |
| 76 virtual bool isTextureBacked(); | 76 virtual bool isTextureBacked(); |
| 77 | 77 |
| 78 // Derived classes should override this if they can assure that the current | 78 // Derived classes should override this if they can assure that the current |
| 79 // image frame contains only resources from its own security origin. | 79 // image frame contains only resources from its own security origin. |
| 80 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; } | 80 virtual bool currentFrameHasSingleSecurityOrigin() const { return false; } |
| 81 | 81 |
| 82 static Image* nullImage(); | 82 static Image* nullImage(); |
| 83 bool isNull() const { return size().isEmpty(); } | 83 bool isNull() const { return size().isEmpty(); } |
| 84 | 84 |
| 85 virtual void setContainerSize(const IntSize&) { } | |
| 86 virtual bool usesContainerSize() const { return false; } | 85 virtual bool usesContainerSize() const { return false; } |
| 87 virtual bool hasRelativeWidth() const { return false; } | 86 virtual bool hasRelativeWidth() const { return false; } |
| 88 virtual bool hasRelativeHeight() const { return false; } | 87 virtual bool hasRelativeHeight() const { return false; } |
| 89 | 88 |
| 90 // Computes (extracts) the intrinsic dimensions and ratio from the Image. Th
e intrinsic ratio | 89 // Computes (extracts) the intrinsic dimensions and ratio from the Image. Th
e intrinsic ratio |
| 91 // will be the 'viewport' of the image. (Same as the dimensions for a raster
image. For SVG | 90 // will be the 'viewport' of the image. (Same as the dimensions for a raster
image. For SVG |
| 92 // images it can be the dimensions defined by the 'viewBox'.) | 91 // images it can be the dimensions defined by the 'viewBox'.) |
| 93 virtual void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intr
insicHeight, FloatSize& intrinsicRatio); | 92 virtual void computeIntrinsicDimensions(Length& intrinsicWidth, Length& intr
insicHeight, FloatSize& intrinsicRatio); |
| 94 | 93 |
| 95 virtual IntSize size() const = 0; | 94 virtual IntSize size() const = 0; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 RefPtr<SharedBuffer> m_encodedImageData; | 157 RefPtr<SharedBuffer> m_encodedImageData; |
| 159 ImageObserver* m_imageObserver; | 158 ImageObserver* m_imageObserver; |
| 160 }; | 159 }; |
| 161 | 160 |
| 162 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ | 161 #define DEFINE_IMAGE_TYPE_CASTS(typeName) \ |
| 163 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) | 162 DEFINE_TYPE_CASTS(typeName, Image, image, image->is##typeName(), image.is##t
ypeName()) |
| 164 | 163 |
| 165 } // namespace blink | 164 } // namespace blink |
| 166 | 165 |
| 167 #endif | 166 #endif |
| OLD | NEW |