OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // Note that the defaultObjectSize is assumed to be in the | 56 // Note that the defaultObjectSize is assumed to be in the |
57 // effective zoom level given by multiplier, i.e. if multiplier is | 57 // effective zoom level given by multiplier, i.e. if multiplier is |
58 // the constant 1 the defaultObjectSize should be unzoomed. | 58 // the constant 1 the defaultObjectSize should be unzoomed. |
59 virtual LayoutSize ImageSize(const LayoutObject&, | 59 virtual LayoutSize ImageSize(const LayoutObject&, |
60 float multiplier, | 60 float multiplier, |
61 const LayoutSize& default_object_size) const = 0; | 61 const LayoutSize& default_object_size) const = 0; |
62 virtual bool ImageHasRelativeSize() const = 0; | 62 virtual bool ImageHasRelativeSize() const = 0; |
63 virtual bool UsesImageContainerSize() const = 0; | 63 virtual bool UsesImageContainerSize() const = 0; |
64 virtual void AddClient(LayoutObject*) = 0; | 64 virtual void AddClient(LayoutObject*) = 0; |
65 virtual void RemoveClient(LayoutObject*) = 0; | 65 virtual void RemoveClient(LayoutObject*) = 0; |
66 // Note that the containerSize is assumed to be in the effective | 66 // Note that the container_size is in the effective zoom level of |
67 // zoom level given by multiplier, i.e if the multiplier is the | 67 // the style that applies to the given LayoutObject, i.e if the zoom |
68 // constant 1 the containerSize should be unzoomed. | 68 // level is 1.0 the container_size should be unzoomed. |
69 virtual PassRefPtr<Image> GetImage(const LayoutObject&, | 69 virtual PassRefPtr<Image> GetImage(const LayoutObject&, |
70 const IntSize& container_size, | 70 const IntSize& container_size) const = 0; |
71 float multiplier) const = 0; | |
72 virtual WrappedImagePtr Data() const = 0; | 71 virtual WrappedImagePtr Data() const = 0; |
73 virtual float ImageScaleFactor() const { return 1; } | 72 virtual float ImageScaleFactor() const { return 1; } |
74 virtual bool KnownToBeOpaque(const LayoutObject&) const = 0; | 73 virtual bool KnownToBeOpaque(const LayoutObject&) const = 0; |
75 virtual ImageResourceContent* CachedImage() const { return 0; } | 74 virtual ImageResourceContent* CachedImage() const { return 0; } |
76 | 75 |
77 ALWAYS_INLINE bool IsImageResource() const { return is_image_resource_; } | 76 ALWAYS_INLINE bool IsImageResource() const { return is_image_resource_; } |
78 ALWAYS_INLINE bool IsPendingImage() const { return is_pending_image_; } | 77 ALWAYS_INLINE bool IsPendingImage() const { return is_pending_image_; } |
79 ALWAYS_INLINE bool IsGeneratedImage() const { return is_generated_image_; } | 78 ALWAYS_INLINE bool IsGeneratedImage() const { return is_generated_image_; } |
80 ALWAYS_INLINE bool IsImageResourceSet() const { | 79 ALWAYS_INLINE bool IsImageResourceSet() const { |
81 return is_image_resource_set_; | 80 return is_image_resource_set_; |
(...skipping 27 matching lines...) Expand all Loading... |
109 #define DEFINE_STYLE_IMAGE_TYPE_CASTS(thisType, function) \ | 108 #define DEFINE_STYLE_IMAGE_TYPE_CASTS(thisType, function) \ |
110 DEFINE_TYPE_CASTS(thisType, StyleImage, styleImage, styleImage->function, \ | 109 DEFINE_TYPE_CASTS(thisType, StyleImage, styleImage, styleImage->function, \ |
111 styleImage.function); \ | 110 styleImage.function); \ |
112 inline thisType* To##thisType(const Member<StyleImage>& styleImage) { \ | 111 inline thisType* To##thisType(const Member<StyleImage>& styleImage) { \ |
113 return To##thisType(styleImage.Get()); \ | 112 return To##thisType(styleImage.Get()); \ |
114 } \ | 113 } \ |
115 typedef int NeedsSemiColonAfterDefineStyleImageTypeCasts | 114 typedef int NeedsSemiColonAfterDefineStyleImageTypeCasts |
116 | 115 |
117 } // namespace blink | 116 } // namespace blink |
118 #endif | 117 #endif |
OLD | NEW |