OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 CSSImageValue* cssImageValue() const { return m_value->isImageValue() ? toCS
SImageValue(m_value.get()) : 0; } | 59 CSSImageValue* cssImageValue() const { return m_value->isImageValue() ? toCS
SImageValue(m_value.get()) : 0; } |
60 CSSImageGeneratorValue* cssImageGeneratorValue() const { return m_value->isI
mageGeneratorValue() ? toCSSImageGeneratorValue(m_value.get()) : 0; } | 60 CSSImageGeneratorValue* cssImageGeneratorValue() const { return m_value->isI
mageGeneratorValue() ? toCSSImageGeneratorValue(m_value.get()) : 0; } |
61 CSSCursorImageValue* cssCursorImageValue() const { return m_value->isCursorI
mageValue() ? toCSSCursorImageValue(m_value.get()) : 0; } | 61 CSSCursorImageValue* cssCursorImageValue() const { return m_value->isCursorI
mageValue() ? toCSSCursorImageValue(m_value.get()) : 0; } |
62 CSSImageSetValue* cssImageSetValue() const { return m_value->isImageSetValue
() ? toCSSImageSetValue(m_value.get()) : 0; } | 62 CSSImageSetValue* cssImageSetValue() const { return m_value->isImageSetValue
() ? toCSSImageSetValue(m_value.get()) : 0; } |
63 | 63 |
64 LayoutSize imageSize(const LayoutObject*, float /*multiplier*/) const overri
de { return LayoutSize(); } | 64 LayoutSize imageSize(const LayoutObject*, float /*multiplier*/) const overri
de { return LayoutSize(); } |
65 bool imageHasRelativeWidth() const override { return false; } | 65 bool imageHasRelativeWidth() const override { return false; } |
66 bool imageHasRelativeHeight() const override { return false; } | 66 bool imageHasRelativeHeight() const override { return false; } |
67 void computeIntrinsicDimensions(const LayoutObject*, Length& /* intrinsicWid
th */ , Length& /* intrinsicHeight */, FloatSize& /* intrinsicRatio */) override
{ } | 67 void computeIntrinsicDimensions(const LayoutObject*, Length& /* intrinsicWid
th */ , Length& /* intrinsicHeight */, FloatSize& /* intrinsicRatio */) override
{ } |
68 bool usesImageContainerSize() const override { return false; } | 68 bool usesImageContainerSize() const override { return false; } |
69 void setContainerSizeForLayoutObject(const LayoutObject*, const IntSize&, fl
oat) override { } | |
70 void addClient(LayoutObject*) override { } | 69 void addClient(LayoutObject*) override { } |
71 void removeClient(LayoutObject*) override { } | 70 void removeClient(LayoutObject*) override { } |
72 PassRefPtr<Image> image(const LayoutObject*, const IntSize&) const override | 71 PassRefPtr<Image> image(const LayoutObject*, const IntSize&, float) const ov
erride |
73 { | 72 { |
74 ASSERT_NOT_REACHED(); | 73 ASSERT_NOT_REACHED(); |
75 return nullptr; | 74 return nullptr; |
76 } | 75 } |
77 bool knownToBeOpaque(const LayoutObject*) const override { return false; } | 76 bool knownToBeOpaque(const LayoutObject*) const override { return false; } |
78 | 77 |
79 DEFINE_INLINE_VIRTUAL_TRACE() | 78 DEFINE_INLINE_VIRTUAL_TRACE() |
80 { | 79 { |
81 visitor->trace(m_value); | 80 visitor->trace(m_value); |
82 StyleImage::trace(visitor); | 81 StyleImage::trace(visitor); |
83 } | 82 } |
84 | 83 |
85 private: | 84 private: |
86 explicit StylePendingImage(const CSSValue& value) | 85 explicit StylePendingImage(const CSSValue& value) |
87 : m_value(const_cast<CSSValue*>(&value)) | 86 : m_value(const_cast<CSSValue*>(&value)) |
88 { | 87 { |
89 m_isPendingImage = true; | 88 m_isPendingImage = true; |
90 } | 89 } |
91 | 90 |
92 // TODO(sashab): Replace this with <const CSSValue> once RefPtrWillBeMember<
> | 91 // TODO(sashab): Replace this with <const CSSValue> once RefPtrWillBeMember<
> |
93 // supports const types. | 92 // supports const types. |
94 RefPtrWillBeMember<CSSValue> m_value; | 93 RefPtrWillBeMember<CSSValue> m_value; |
95 }; | 94 }; |
96 | 95 |
97 DEFINE_STYLE_IMAGE_TYPE_CASTS(StylePendingImage, isPendingImage()); | 96 DEFINE_STYLE_IMAGE_TYPE_CASTS(StylePendingImage, isPendingImage()); |
98 | 97 |
99 } | 98 } |
100 #endif | 99 #endif |
OLD | NEW |